From: Andrew Cagney <cagney@gnu.org>
To: gdb-patches@sources.redhat.com
Subject: [commit] Let {TM,XM,NM}_FILE specify a path
Date: Thu, 02 Sep 2004 22:13:00 -0000 [thread overview]
Message-ID: <41379AC6.90605@gnu.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 522 bytes --]
Hello,
Many of the still existing TM files (the others are done for
consistency) are just acting as an indirect include of another file.
For instance, tm-nbsd.h #includes "solib.h". This patch tweaks
configure.in so that a TM_FILE can explicitly specify any file (instead
of having to pull it in via an #include) - that lets us eliminate both
the indirection and the unnecessary config file.
It then tweaks arm/nbsd.mt to make use of this, letting arm/tm-nbsd.h be
eliminated. More to follow.
committed,
Andrew
[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 3426 bytes --]
2004-09-02 Andrew Cagney <cagney@gnu.org>
* configure.in: Let TM_FILE, XM_FILE and NAT_FILE specify a path.
* configure: Re-generate.
* config/arm/nbsd.mt (TM_FILE): Set to "solib.h".
* config/arm/tm-nbsd.h: Delete file.
Index: configure.in
===================================================================
RCS file: /cvs/src/src/gdb/configure.in,v
retrieving revision 1.168
diff -p -u -r1.168 configure.in
--- configure.in 2 Sep 2004 17:22:05 -0000 1.168
+++ configure.in 2 Sep 2004 22:01:13 -0000
@@ -1520,7 +1520,10 @@ rm -f xm.h
xm_h=""
if test "${hostfile}" != ""; then
xm_h=xm.h
- GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}"
+ case "${hostfile}" in
+ xm-*.h ) GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}" ;;
+ * ) GDB_XM_FILE="${hostfile}"
+ esac
files="${files} ${GDB_XM_FILE}"
links="${links} xm.h"
AC_DEFINE_UNQUOTED(GDB_XM_FILE, "${GDB_XM_FILE}")
@@ -1531,7 +1534,10 @@ rm -f tm.h
tm_h=""
if test "${targetfile}" != ""; then
tm_h=tm.h
- GDB_TM_FILE="config/${gdb_target_cpu}/${targetfile}"
+ case "${targetfile}" in
+ tm-*.h ) GDB_TM_FILE="config/${gdb_host_cpu}/${targetfile}" ;;
+ * ) GDB_TM_FILE="${targetfile}"
+ esac
files="${files} ${GDB_TM_FILE}"
links="${links} tm.h"
AC_DEFINE_UNQUOTED(GDB_TM_FILE, "${GDB_TM_FILE}")
@@ -1542,7 +1548,10 @@ rm -f nm.h
nm_h=""
if test "${nativefile}" != ""; then
nm_h=nm.h
- GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}"
+ case "${nativefile}" in
+ nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
+ * ) GDB_NM_FILE="${nativefile}"
+ esac
files="${files} ${GDB_NM_FILE}"
links="${links} nm.h"
AC_DEFINE_UNQUOTED(GDB_NM_FILE, "${GDB_NM_FILE}")
Index: config/arm/nbsd.mt
===================================================================
RCS file: /cvs/src/src/gdb/config/arm/nbsd.mt,v
retrieving revision 1.6
diff -p -u -r1.6 nbsd.mt
--- config/arm/nbsd.mt 14 Nov 2003 20:45:11 -0000 1.6
+++ config/arm/nbsd.mt 2 Sep 2004 22:01:13 -0000
@@ -1,3 +1,3 @@
# Target: ARM running NetBSD
TDEPFILES= arm-tdep.o armnbsd-tdep.o solib.o solib-svr4.o nbsd-tdep.o
-TM_FILE=tm-nbsd.h
+TM_FILE=solib.h
Index: config/arm/tm-nbsd.h
===================================================================
RCS file: config/arm/tm-nbsd.h
diff -N config/arm/tm-nbsd.h
--- config/arm/tm-nbsd.h 14 Nov 2003 20:45:12 -0000 1.9
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,26 +0,0 @@
-/* Macro definitions for ARM running under NetBSD.
- Copyright 2003 Free Software Foundation, Inc.
-
- 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. */
-
-#ifndef TM_NBSD_H
-#define TM_NBSD_H
-
-#include "solib.h"
-
-#endif /* TM_NBSD_H */
next reply other threads:[~2004-09-02 22:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-02 22:13 Andrew Cagney [this message]
2004-09-03 11:17 ` Eli Zaretskii
2004-09-03 16:39 ` Andrew Cagney
2004-09-04 11:42 ` Eli Zaretskii
2004-09-09 15:17 ` Andrew Cagney
2004-09-09 19:19 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=41379AC6.90605@gnu.org \
--to=cagney@gnu.org \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox