This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [rfa/rfc] Build libcommon.a for gdb and gdbserver


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  <tromey@redhat.com>

	* 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 <http://www.gnu.org/licenses/>.
+
+# 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 <http://www.gnu.org/licenses/>.
 
 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])


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]