From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25550 invoked by alias); 14 Feb 2011 17:58:15 -0000 Received: (qmail 25541 invoked by uid 22791); 14 Feb 2011 17:58:14 -0000 X-SWARE-Spam-Status: No, hits=-6.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 14 Feb 2011 17:58:07 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p1EHvxJa022667 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 14 Feb 2011 12:58:00 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p1EHvxw1018394; Mon, 14 Feb 2011 12:57:59 -0500 Received: from opsy.redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id p1EHvwHG021522; Mon, 14 Feb 2011 12:57:58 -0500 Received: by opsy.redhat.com (Postfix, from userid 500) id 540D53781C7; Mon, 14 Feb 2011 10:57:58 -0700 (MST) From: Tom Tromey To: Yao Qi Cc: Pedro Alves , gdb-patches@sourceware.org Subject: Re: [rfa/rfc] Build libcommon.a for gdb and gdbserver References: <4D30E23F.3080103@codesourcery.com> <4D375F44.70504@codesourcery.com> <201101281504.38962.pedro@codesourcery.com> <4D550834.6080807@codesourcery.com> <4D55FAB4.7090001@codesourcery.com> Date: Mon, 14 Feb 2011 18:22:00 -0000 In-Reply-To: (Tom Tromey's message of "Mon, 14 Feb 2011 08:16:43 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-02/txt/msg00288.txt.bz2 >>>>> "Tom" == Tom Tromey writes: Tom> This patch changes gdb/common/ to use Automake. Of course, that one didn't work. Tom> Let me know what you think. I am running it through the tester. Here's one that does. It is vaguely bogus due to the dummy-config.h and PACKAGE_NAME stuff. Autoconf doesn't seem to let you turn this off, and we end up with conflicts. We can probably fix this more cleanly than I have below; I just want to get feedback on the idea before committing to that. Tom 2011-02-14 Tom Tromey * configure, aclocal.m4, Makefile.in: Rebuild. * dummy-config.h.in: New. * configure.ac: Update for automake. * Makefile.am: New file. diff --git a/gdb/common/Makefile.am b/gdb/common/Makefile.am new file mode 100644 index 0000000..0cf2084 --- /dev/null +++ b/gdb/common/Makefile.am @@ -0,0 +1,26 @@ +# Copyright (C) 2011 +# 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 3 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, see . + +# This may be used indirectly via GDB_INCLUDE. +BFD_DIR = ../../bfd + +AM_CFLAGS = -I../ -I$(srcdir)/../../include/ $(GDB_INCLUDE) $(GDB_FLAGS) + +noinst_LIBRARIES = libcommon.a + +libcommon_a_SOURCES = signals.c diff --git a/gdb/common/configure.ac b/gdb/common/configure.ac index 1ef85fe..f77ae38 100644 --- a/gdb/common/configure.ac +++ b/gdb/common/configure.ac @@ -18,30 +18,23 @@ # along with this program. If not, see . AC_PREREQ(2.59) -AC_INIT(.) +# The package and version don't matter, but autoconf insists. +AC_INIT([common], [0.0]) +AC_CONFIG_SRCDIR([gdb_signals.h]) + +# We don't actually use this, but using a header protects us against +# redefinition of PACKAGE_NAME et al. +AC_CONFIG_HEADER([dummy-config.h]) AC_CANONICAL_BUILD AC_CANONICAL_HOST AC_CANONICAL_TARGET +AM_INIT_AUTOMAKE([cygnus no-define no-dist -Wall]) + AC_PROG_CC AC_PROG_RANLIB -AC_CHECK_PROGS([ACLOCAL], [aclocal], [$MISSING aclocal]) -AC_CHECK_PROGS([AUTOCONF], [autoconf], [$MISSING autoconf]) -AC_CHECK_PROGS([AUTOHEADER], [autoheader], [$MISSING autoheader]) - -# Check for the 'make' the user wants to use. -AC_CHECK_PROGS(MAKE, make) -MAKE_IS_GNU= -case "`$MAKE --version 2>&1 | sed 1q`" in - *GNU*) - MAKE_IS_GNU=yes - ;; -esac -AM_CONDITIONAL(GMAKE, test "$MAKE_IS_GNU" = yes) -AC_PROG_MAKE_SET - AC_SUBST(COMMON_CPU_OBJ) AC_SUBST(COMMON_CPU_SRC) @@ -69,6 +62,6 @@ fi AC_SUBST(GDB_FLAGS) AC_SUBST(GDB_INCLUDE) -AC_EXEEXT +AM_MAINTAINER_MODE AC_OUTPUT([Makefile])