This is the mail archive of the gdb-patches@sources.redhat.com 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]

[PATCH] Cleanup Configure.in (14/n)


This patch introduces multiple AC_CONFIG_SUBDIRS macro calls.  We
cannot fully get rid of the AC_CONFIG_SUBDIRS($confdirs) call (which
going to give a warning with Autoconf 2.5x) until we commit to using
Autoconf 2.5x.  As this patch touches --enable-multi-ice, I also
cleaned up the code dealing with that option.  Likewise for code
dealing with gdbserver.

Checked in.

Mark

Index: ChangeLog
from  Mark Kettenis  <kettenis@gnu.org>

	* configure.in: Remove all use of the SUBDIRS variable; add
	directories using the AC_CONFIG_SUBDIRS macro instead.  Polish
	code providing the --enable-multi-ice option, and move it right in
	front of the code that checks whether gdbserver is supported.
	Polish that too.
	* Makefile.in (SUBDIRS): Substitute @subdirs@ instead of
	@SUBDIRS@.

Index: configure.in
===================================================================
RCS file: /cvs/src/src/gdb/configure.in,v
retrieving revision 1.110
diff -u -p -r1.110 configure.in
--- configure.in 3 Jan 2003 14:45:47 -0000 1.110
+++ configure.in 3 Jan 2003 23:11:49 -0000
@@ -60,21 +60,8 @@ CONFIG_CLEAN=
 CONFIG_INSTALL=
 CONFIG_UNINSTALL=
 
-SUBDIRS="doc testsuite nlm"
-configdirs="doc testsuite"
-
-AC_ARG_ENABLE(multi-ice,
-[  --enable-multi-ice            Build the multi-ice-gdb-server],
-[case "${enableval}" in
-    yes ) enable_multi_ice="yes" ;;
-    no)  enable_multi_ice="no" ;;
-    *) AC_MSG_ERROR(Bad value for --enable-multi-ice: ${enableval}) ;;
-  esac
-])
-
-if test "${enable_multi_ice}" = "yes"; then
-  configdirs="${configdirs} multi-ice"
-fi
+AC_CONFIG_SUBDIRS(doc testsuite)
+configdirs=
 
 . $srcdir/configure.host
 
@@ -1118,7 +1105,6 @@ if test "${enable_gdbtk}" = "yes"; then
 	fi
     fi
 
-    SUBDIRS="${SUBDIRS} gdbtk"
     configdirs="${configdirs} gdbtk"
 fi
 
@@ -1324,22 +1310,31 @@ case "${GDB_MULTI_ARCH}" in
     *)  AC_MSG_ERROR("GDB: Unknown GDB_MULTI_ARCH value ${GDB_MULTI_ARCH}");;
 esac
 
-if test "${enable_multi_ice}" = "yes"; then
-  SUBDIRS="${SUBDIRS} multi-ice"
+# Enable multi-ice-gdb-server.
+AC_ARG_ENABLE(multi-ice,
+[  --enable-multi-ice      build the multi-ice-gdb-server],
+  [case $enableval in
+    yes | no)
+      ;;
+    *) AC_MSG_ERROR([bad value $enableval for --enable-multi-ice]) ;;
+  esac])
+if test "x$enable_multi_ice" = xyes; then
+  configdirs="$configdirs multi-ice"
 fi
 
-# ``gdbserver'' can only be built in a native configuration.
-if test x"${target}" = x"${host}"; then
-    AC_MSG_CHECKING(whether gdbserver is supported on this host)
-    if test x"${build_gdbserver}" = xyes ; then
-	configdirs="${configdirs} gdbserver"
-	SUBDIRS="${SUBDIRS} gdbserver"
-	AC_MSG_RESULT(yes)
-    else
-	AC_MSG_RESULT(no)
-    fi
+# We only build gdbserver automatically if host and target are the same.
+if test "x$target" = "x$host"; then
+  AC_MSG_CHECKING(whether gdbserver is supported on this host)
+  if test "x$build_gdbserver" = xyes; then
+    configdirs="$configdirs gdbserver"
+    AC_MSG_RESULT(yes)
+  else
+    AC_MSG_RESULT(no)
+  fi
 fi
 
+AC_CONFIG_SUBDIRS($configdirs)
+SUBDIRS=$subdirs
 AC_SUBST(SUBDIRS)
 
 # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
@@ -1399,7 +1394,6 @@ AC_DEFINE(GDB_DEFAULT_HOST_CHARSET, "ISO
 
 AM_ICONV
 
-AC_CONFIG_SUBDIRS($configdirs)
 AC_OUTPUT(Makefile .gdbinit:gdbinit.in,
 [
 dnl Autoconf doesn't provide a mechanism for modifying definitions 
Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/Makefile.in,v
retrieving revision 1.303
diff -u -p -r1.303 Makefile.in
--- Makefile.in 3 Jan 2003 14:10:07 -0000 1.303
+++ Makefile.in 3 Jan 2003 23:11:50 -0000
@@ -838,7 +838,7 @@ OBS = $(COMMON_OBS) $(ANNOTATE_OBS)
 
 TSOBS = inflow.o
 
-SUBDIRS = @SUBDIRS@
+SUBDIRS = @subdirs@
 
 # For now, shortcut the "configure GDB for fewer languages" stuff.
 YYFILES = c-exp.tab.c \


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