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


>>>>> "Tom" == Tom Tromey <tromey@redhat.com> 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  <tromey@redhat.com>

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


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