From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2445 invoked by alias); 14 Feb 2011 15:17:01 -0000 Received: (qmail 2434 invoked by uid 22791); 14 Feb 2011 15:17:00 -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 15:16:55 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p1EFGj2C025350 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 14 Feb 2011 10:16:45 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p1EFGiIM015627; Mon, 14 Feb 2011 10:16:45 -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 p1EFGia0005501; Mon, 14 Feb 2011 10:16:44 -0500 Received: by opsy.redhat.com (Postfix, from userid 500) id BAD613781C7; Mon, 14 Feb 2011 08:16:43 -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 15:19:00 -0000 In-Reply-To: <4D55FAB4.7090001@codesourcery.com> (Yao Qi's message of "Sat, 12 Feb 2011 11:12:52 +0800") 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/msg00281.txt.bz2 Yao> Add some more targets in common/Makefile.in in this patch. `make Yao> {info,pdf,html,dvi}' works. This patch changes gdb/common/ to use Automake. The advantages of using it are simpler maintenance and more features. E.g., the above bug would not have occurred; the Makefile you actually edit is just 4 lines of code; dependency tracking is built in; etc. I didn't deal with COMMON_CPU_{SRC,OBJ} in this patch. I wasn't sure if these were placeholders or leftovers from something else. Let me know what you think. I am running it through the tester. Tom 2011-02-14 Tom Tromey * configure, aclocal.m4, Makefile.in: Rebuild. * 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..1fb86cf --- /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 = $(GDB_INCLUDE) + +noinst_LIBRARIES = libcommon.a + +libcommon_a_SOURCES = signals.c diff --git a/gdb/common/configure.ac b/gdb/common/configure.ac index 1ef85fe..518d3d4 100644 --- a/gdb/common/configure.ac +++ b/gdb/common/configure.ac @@ -18,30 +18,19 @@ # 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]) 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 +58,6 @@ fi AC_SUBST(GDB_FLAGS) AC_SUBST(GDB_INCLUDE) -AC_EXEEXT +AM_MAINTAINER_MODE AC_OUTPUT([Makefile])