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]

add autoconf/makefile glue to gnulib/ (was: Fix in-src-tree builds by making gdbserver/gnulib/ a separate library (a la libiberty, etc.), and adding ACX_CONFIGURE_DIR.)


Here's the final patch that switches the gnulib scheme to treating gnulib
as a separate library, with its own configure and makefile.
This fixes the srcdir == builddir build failures.

The patch populates the now empty gdb/gnulib/ directory with its
own configure script, that that is now the only place where gl_INIT and friends
will be called.  All the gl_INIT and friends bits are removed from both gdb's
and gdbserver's configury.  Then, both GDB and GDBserver are made to build and link
the resulting libgnu.a under build-gnulib/import/libgnu.a for gdb, and
build-gnulib-gdbserver/import/libgnu.a for gdbserver (instead of the current
gnulib/libgnu.a).  gnulib autoconf's many things and puts the result in a
config.h file.  Currently, that config.h files is GDB's (or now gdbserver's) own config.h,
but with the split into a gnulib specific library, gnulib now creates its own config.h
under gnulib/.  Nothing in gdb or gdbserver will end up pointing -I at gnulib/ (and that's
how it shall remain, instead they'll point -I at gnulib/import), so in the places where
we used to include config.h, we now also need to include gnulib's config.h to get the same
effect as before.  This is necessary because some of gnulib's headers, not just
its .c files, want gnulib's config.h to be included first.

There's also the problem that AC_CONFIG_SUBDIRS isn't designed for the use GDBserver
would like to give it; namely, building gnulib under gdbserver/gnulib,
while the sources are not under gdbserver/gnulib, but elsewhere (gdbserver/../gnulib/).
To address that, the patch adds a new m4 macro, ACX_CONFIGURE_DIR that is based on the
AC_CONFIG_SUBDIRS-related code that runs the subdirs configury, but that that unlike
AC_CONFIG_SUBDIRS allows specifying both the resulting build dir and the source dir
of the subproject we want to configure.  For example, with that, we can call

  ACX_CONFIGURE_DIR(["../gnulib"], ["build-gnulib-gdbserver"])

in gdbserver's configure.ac, and that configures the gnulib library under
gdb/gdbserver/build-gnulib-gdbserver, while gnulib's sources remain under gdb/gnulib.

On the GDB side, gnulib _is_ indeed under gdb/ so AC_CONFIG_SUBDIRS(gnulib)
would work.  But, only in the case of building with srcdir != builddir.  When
building with srcdir == builddir, the src/gdb/gnulib would end up configured,
when building gdb's copy of gnulib.  Then, when gdbserver would try to configure its
gnulib library, even if in srcdir!=build, it'd trip on the fact that the gnulib's source
directory, under src/gdb/gnulib, was already configured, which causes a hard
configure fail (AM_INIT_AUTOMAKE complains).  Forcing the gdbserver's gnulib copy
to configure gdbserver/../gnulib, is wrong for stepping out of the build dir.

So this works around the srcdir==builddir issue by always building the new
gnulib-based library on a separate directory, called build-gnulib for gdb, and
build-gnulib-gdbserver for gdbserver.  When you build with srcdir==builddir, you
end up with:

 src/gdb/gnulib/...  <<== gnulib's sources
 src/gdb/build-gnulib/... <<= gdb builds it here
 src/gdb/gdbserver/build-gnulib-gdbserver/... <<= gdbserver builds it here

Below's the patch that I checked in, with the autogenerated bits elided.

2012-04-19  Pedro Alves  <palves@redhat.com>

	gdb/
	* Makefile.in (GNULIB_BUILDDIR): New.
	(LIBGNU, INCGNU, GNULIB_H): Adjust.
	(SUBDIRS): Add $(GNULIB_BUILDDIR).
	(CLEANDIRS). Remove gnulib/import.
	(REQUIRED_SUBDIRS): Replace gnulib/import with $(GNULIB_BUILDDIR).
	(all-lib): Ditto.
	(distclean): Remove the $(GNULIB_BUILDDIR) directory.
	(gnulib/import/Makefile): Replace gnulib/import with
	$(GNULIB_BUILDDIR).  Set CONFIG_FILES to just Makefile.
	(ACLOCAL_AMFLAGS): Remove '-I gnulib/import/m4'.
	(aclocal_m4_deps): Remove the gnulib dependencies.  Add
	acx_configure_dir.m4.
	* acinclude.m4: Include acx_configure_dir.m4.
	* acx_configure_dir.m4: New file.
	* aclocal.m4: Regenerate.
        * configure.ac: Remove gl_EARLY, gl_INIT and AM_INIT_AUTOMAKE
        calls.  Configure gnulib using ACX_CONFIGURE_DIR.
        (GNULIB): New variable.
        (GNULIB_STDINT_H): Adjust.
        (AC_OUTPUT): Don't output gnulib/Makefile.
        * gdb/defs.h: Include build-gnulib/config.h.
        * aclocal.m4: Regenerate.
        * config.in: Regenerate.
        * configure: Regenerate.

        * gnulib/Makefile.in: New file.
        * gnulib/configure.ac: New file.
        * gnulib/aclocal.m4: New file.
        * gnulib/config.in: New file.
        * gnulib/configure: New file.
	* gnulib/: Re-run gnulib-tool to adjust.

        gdb/gdbserver/
        * Makefile.in (GNULIB_BUILDDIR): New.
	(LIBGNU, INCGNU, GNULIB_H): Adjust.
        (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
        (all, install-only, uninstall, clean-info, all-lib, clean): No
        longer pass GNULIB_FLAGS_TO_PASS.  Use subdir_do.
        (maintainer-clean realclean distclean): Use subdir_do.
        (subdir_do): New.
        (gnulib/import/Makefile): Adjust.  Replace gnulib/import with
	$(GNULIB_BUILDDIR).  Don't pass argument to config.status.
        * acinclude.m4: Include acx_configure_dir.m4.
        * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
        calls.  Call AC_PROG_RANLIB.  Configure gnulib using
        ACX_CONFIGURE_DIR.
        (GNULIB): New.
        (GNULIB_STDINT_H): Adjust.
        (AC_OUTPUT): Don't output gnulib/Makefile anymore.
        * gdbreplay.c: Include build-gnulib/config.h.
        * server.h: Likewise.
        * aclocal.m4: Regenerate.
        * config.in: Regenerate.
        * configure: Regenerate.
---
 gdb/Makefile.in                      |   47 
 gdb/acinclude.m4                     |    2 
 gdb/aclocal.m4                       |  880 ---
 gdb/acx_configure_dir.m4             |  112 
 gdb/config.in                        |  283 -
 gdb/configure                        | 4485 +---------------
 gdb/configure.ac                     |   17 
 gdb/gdbserver/Makefile.in            |   67 
 gdb/gdbserver/acinclude.m4           |    2 
 gdb/gdbserver/aclocal.m4             |  901 ---
 gdb/gdbserver/config.in              |  263 -
 gdb/gdbserver/configure              | 4888 ++---------------
 gdb/gdbserver/configure.ac           |   18 
 gdb/gnulib/Makefile.in               |  267 +
 gdb/gnulib/aclocal.m4                | 1032 ++++
 gdb/gnulib/config.in                 |  318 +
 gdb/gnulib/configure                 | 9648 ++++++++++++++++++++++++++++++++++
 gdb/gnulib/configure.ac              |   62 
 gdb/gnulib/import/Makefile.am        |   22 
 gdb/gnulib/import/Makefile.in        |  185 -
 gdb/gnulib/import/m4/gnulib-cache.m4 |    6 
 gdb/gnulib/import/m4/gnulib-comp.m4  |    7 
 22 files changed, 12570 insertions(+), 10942 deletions(-)
 create mode 100644 gdb/acx_configure_dir.m4
 create mode 100644 gdb/gnulib/Makefile.in
 create mode 100644 gdb/gnulib/aclocal.m4
 create mode 100644 gdb/gnulib/config.in
 create mode 100755 gdb/gnulib/configure
 create mode 100644 gdb/gnulib/configure.ac

diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 03298cb..0e87eeb 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -170,12 +170,13 @@ INTL_CFLAGS = @INCINTL@
 GDB_DATADIR = @GDB_DATADIR@
 
 # Helper code from gnulib.
-LIBGNU = gnulib/import/libgnu.a
-INCGNU = -I$(srcdir)/gnulib/import -Ignulib/import
+GNULIB_BUILDDIR = build-gnulib
+LIBGNU = $(GNULIB_BUILDDIR)/import/libgnu.a
+INCGNU = -I$(srcdir)/gnulib/import -I$(GNULIB_BUILDDIR)/import
 
 # Generated headers in the gnulib directory.  These must be listed
 # so that they are generated before other files are compiled.
-GNULIB_H = gnulib/import/string.h @GNULIB_STDINT_H@
+GNULIB_H = $(GNULIB_BUILDDIR)/import/string.h @GNULIB_STDINT_H@
 
 #
 # CLI sub directory definitons
@@ -916,14 +917,14 @@ COMMON_OBS = $(DEPFILES) $(CONFIG_OBS) $(YYOBJ) \
 
 TSOBS = inflow.o
 
-SUBDIRS = doc @subdirs@ data-directory
-CLEANDIRS = $(SUBDIRS) gnulib/import
+SUBDIRS = doc @subdirs@ data-directory $(GNULIB_BUILDDIR)
+CLEANDIRS = $(SUBDIRS)
 
 # List of subdirectories in the build tree that must exist.
 # This is used to force build failures in existing trees when
 # a new directory is added.
 # The format here is for the `case' shell command.
-REQUIRED_SUBDIRS = doc | testsuite | gnulib/import | data-directory
+REQUIRED_SUBDIRS = doc | testsuite | $(GNULIB_BUILDDIR) | data-directory
 
 # For now, shortcut the "configure GDB for fewer languages" stuff.
 YYFILES = c-exp.c \
@@ -1163,8 +1164,8 @@ gdb$(EXEEXT): gdb.o $(LIBGDB_OBS) $(ADD_DEPS) $(CDEPS) $(TDEPLIBS)
 
 # Convenience rule to handle recursion.
 $(LIBGNU) $(GNULIB_H): all-lib
-all-lib: gnulib/import/Makefile
-	@$(MAKE) $(FLAGS_TO_PASS) DO=all DODIRS=gnulib/import subdir_do
+all-lib: $(GNULIB_BUILDDIR)/Makefile
+	@$(MAKE) $(FLAGS_TO_PASS) DO=all DODIRS=$(GNULIB_BUILDDIR) subdir_do
 .PHONY: all-lib
 
 # Convenience rule to handle recursion.
@@ -1219,6 +1220,7 @@ clean mostlyclean: $(CONFIG_CLEAN)
 # always included in SUBDIRS.  Remove the gdbserver files explicitly.
 distclean: clean
 	@$(MAKE) $(FLAGS_TO_PASS) DO=distclean "DODIRS=$(CLEANDIRS)" subdir_do
+	rm -rf $(GNULIB_BUILDDIR)
 	rm -f gdbserver/config.status gdbserver/config.log
 	rm -f gdbserver/tm.h gdbserver/xm.h gdbserver/nm.h
 	rm -f gdbserver/Makefile gdbserver/config.cache
@@ -1274,8 +1276,8 @@ Makefile: Makefile.in config.status @frags@
 	  CONFIG_HEADERS= \
 	  $(SHELL) config.status
 
-gnulib/import/Makefile: gnulib/import/Makefile.in config.status @frags@
-	CONFIG_FILES="gnulib/import/Makefile" \
+$(GNULIB_BUILDDIR)/Makefile: gnulib/Makefile.in config.status @frags@
+	@cd $(GNULIB_BUILDDIR); CONFIG_FILES="Makefile" \
 	  CONFIG_COMMANDS="depfiles" \
 	  CONFIG_HEADERS= \
 	  CONFIG_LINKS= \
@@ -1303,31 +1305,10 @@ config.status: $(srcdir)/configure configure.tgt configure.host
 	$(SHELL) config.status --recheck
 
 ACLOCAL = aclocal
-ACLOCAL_AMFLAGS = -I gnulib/import/m4 -I ../config
+ACLOCAL_AMFLAGS = -I ../config
 aclocal_m4_deps = \
 	configure.ac \
-	gnulib/import/m4/00gnulib.m4 \
-	gnulib/import/m4/extensions.m4 \
-	gnulib/import/m4/gnulib-cache.m4 \
-	gnulib/import/m4/gnulib-common.m4 \
-	gnulib/import/m4/gnulib-comp.m4 \
-	gnulib/import/m4/gnulib-tool.m4 \
-	gnulib/import/m4/include_next.m4 \
-	gnulib/import/m4/inttypes.m4 \
-	gnulib/import/m4/inttypes-pri.m4 \
-	gnulib/import/m4/longlong.m4 \
-	gnulib/import/m4/memchr.m4 \
-	gnulib/import/m4/memmem.m4 \
-	gnulib/import/m4/mmap-anon.m4 \
-	gnulib/import/m4/multiarch.m4 \
-	gnulib/import/m4/onceonly.m4 \
-	gnulib/import/m4/stddef_h.m4 \
-	gnulib/import/m4/stdint.m4 \
-	gnulib/import/m4/string_h.m4 \
-	gnulib/import/m4/warn-on-use.m4 \
-	gnulib/import/m4/wchar_h.m4 \
-	gnulib/import/m4/wchar_t.m4 \
-	gnulib/import/m4/wint_t.m4 \
+	acx_configure_dir.m4 \
 	../config/extensions.m4 \
 	../config/lead-dot.m4 \
 	../config/proginstall.m4 \
diff --git a/gdb/acinclude.m4 b/gdb/acinclude.m4
index 1942ef4..9d231e1 100644
--- a/gdb/acinclude.m4
+++ b/gdb/acinclude.m4
@@ -1,6 +1,8 @@
 dnl written by Rob Savoye <rob@cygnus.com> for Cygnus Support
 dnl major rewriting for Tcl 7.5 by Don Libes <libes@nist.gov>
 
+sinclude(acx_configure_dir.m4)
+
 dnl gdb/configure.in uses BFD_NEED_DECLARATION, so get its definition.
 sinclude(../bfd/bfd.m4)
 
diff --git a/gdb/acx_configure_dir.m4 b/gdb/acx_configure_dir.m4
new file mode 100644
index 0000000..57a64a6
--- /dev/null
+++ b/gdb/acx_configure_dir.m4
@@ -0,0 +1,112 @@
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Free Software
+# Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# ACX_CONFIGURE_DIR(SRC-DIR-NAME, BUILD-DIR-NAME)
+# ---------------------------
+#
+# Configure a subdirectory.  This is an alternative to
+# AC_CONFIG_SUBDIRS that allows pointing the source directory
+# somewhere else.  The build directory is always a subdirectory of the
+# top build directory.  This is heavilly based on Autoconf 2.64's
+# _AC_OUTPUT_SUBDIRS.
+#
+# Inputs:
+#   - SRC-DIR-NAME is the source directory, relative to $srcdir.
+#   - BUILD-DIR-NAME is `top-build -> build'
+
+AC_DEFUN([ACX_CONFIGURE_DIR],
+[
+  in_src=$1
+  in_build=$2
+
+  # Remove --cache-file, --srcdir, and --disable-option-checking arguments
+  # so they do not pile up.
+  ac_sub_configure_args=
+  ac_prev=
+  eval "set x $ac_configure_args"
+  shift
+  for ac_arg
+  do
+    if test -n "$ac_prev"; then
+      ac_prev=
+      continue
+    fi
+    case $ac_arg in
+    -cache-file | --cache-file | --cache-fil | --cache-fi \
+    | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+      ac_prev=cache_file ;;
+    -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+    | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
+    | --c=*)
+      ;;
+    --config-cache | -C)
+      ;;
+    -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+      ac_prev=srcdir ;;
+    -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+      ;;
+    -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+      ac_prev=prefix ;;
+    -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+      ;;
+    --disable-option-checking)
+      ;;
+    *)
+      case $ac_arg in
+      *\'*) ac_arg=`AS_ECHO(["$ac_arg"]) | sed "s/'/'\\\\\\\\''/g"` ;;
+      esac
+      AS_VAR_APPEND([ac_sub_configure_args], [" '$ac_arg'"]) ;;
+    esac
+  done
+
+  # Always prepend --prefix to ensure using the same prefix
+  # in subdir configurations.
+  ac_arg="--prefix=$prefix"
+  case $ac_arg in
+  *\'*) ac_arg=`AS_ECHO(["$ac_arg"]) | sed "s/'/'\\\\\\\\''/g"` ;;
+  esac
+  ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
+
+  # Pass --silent
+  if test "$silent" = yes; then
+    ac_sub_configure_args="--silent $ac_sub_configure_args"
+  fi
+
+  # Always prepend --disable-option-checking to silence warnings, since
+  # different subdirs can have different --enable and --with options.
+  ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
+
+  ac_popdir=`pwd`
+  ac_dir=$in_build
+
+  ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
+  _AS_ECHO_LOG([$ac_msg])
+  _AS_ECHO([$ac_msg])
+  AS_MKDIR_P(["$ac_dir"])
+
+  ac_srcdir=../$srcdir/$in_src
+
+  cd "$ac_dir"
+
+  ac_sub_configure=$ac_srcdir/configure
+
+  # Make the cache file name correct relative to the subdirectory.
+  case $cache_file in
+  [[\\/]]* | ?:[[\\/]]* ) ac_sub_cache_file=$cache_file ;;
+  *) # Relative name.
+    ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
+  esac
+
+  AC_MSG_NOTICE([running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir])
+  # The eval makes quoting arguments work.
+  eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
+       --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
+    AC_MSG_ERROR([$ac_sub_configure failed for $ac_dir])
+
+  cd "$ac_popdir"
+])# ACX_CONFIGURE_DIR
diff --git a/gdb/configure.ac b/gdb/configure.ac
index 2fa2519..a40c2e5 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -25,7 +25,6 @@ AM_MAINTAINER_MODE
 
 AC_PROG_CC
 AC_USE_SYSTEM_EXTENSIONS
-gl_EARLY
 ACX_LARGEFILE
 AM_PROG_CC_STDC
 
@@ -47,6 +46,12 @@ esac
 AM_CONDITIONAL(GMAKE, test "$MAKE_IS_GNU" = yes)
 AC_PROG_MAKE_SET
 
+# Configure gnulib.  We need to build gnulib under some other
+# directory not "gnulib", to avoid the problem of both GDB and
+# GDBserver wanting to build it in the same directory, when building
+# in the source dir.
+ACX_CONFIGURE_DIR(["gnulib"], ["build-gnulib"])
+
 dnl List of object files and targets accumulated by configure.
 
 CONFIG_OBS=
@@ -72,12 +77,12 @@ if test x"$USE_NLS" = xyes; then
    CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
 fi
 
-gl_INIT
+GNULIB=build-gnulib/import
 
 # For Makefile dependencies.
 GNULIB_STDINT_H=
 if test x"$STDINT_H" != x; then
-  GNULIB_STDINT_H=gnulib/$STDINT_H
+  GNULIB_STDINT_H=$GNULIB/$STDINT_H
 fi
 AC_SUBST(GNULIB_STDINT_H)
 
@@ -105,10 +110,6 @@ if test x"$gdb_cv_have_makeinfo_click" = xyes; then
 fi
 AC_SUBST(MAKEINFO_EXTRA_FLAGS)
 
-# GDB does not use automake, but gnulib does.  This line lets us
-# generate its Makefile.in.
-AM_INIT_AUTOMAKE(gdb, UNUSED-VERSION, [no-define])
-
 GDB_AC_WITH_DIR(DEBUGDIR, separate-debug-dir,
     [look for global separate debug info in this path @<:@LIBDIR/debug@:>@],
     [${libdir}/debug])
@@ -2242,7 +2243,7 @@ dnl  At the moment, we just assume it's UTF-8.
 AC_DEFINE(GDB_DEFAULT_HOST_CHARSET, "UTF-8",
           [Define to be a string naming the default host character set.])
 
-AC_OUTPUT(Makefile gdb-gdb.gdb doc/Makefile gnulib/import/Makefile data-directory/Makefile,
+AC_OUTPUT(Makefile gdb-gdb.gdb doc/Makefile data-directory/Makefile,
 [
 case x$CONFIG_HEADERS in
 xconfig.h:config.in)
diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in
index cbeccef..1e50ae2 100644
--- a/gdb/gdbserver/Makefile.in
+++ b/gdb/gdbserver/Makefile.in
@@ -76,20 +76,13 @@ ustlibs = @ustlibs@
 ustinc = @ustinc@
 
 # gnulib
-LIBGNU = gnulib/import/libgnu.a
-INCGNU = -I$(srcdir)/../gnulib/import -Ignulib/import
-
-# We build gnulib directly under the gdbserver build directory, but
-# its sources don't live directly under gdbserver's source directory.
-# Tweak $srcdir and VPATH to make that work.
-GNULIB_FLAGS_TO_PASS = \
-	"top_srcdir=$(abs_top_srcdir)/.." \
-	"srcdir=$(abs_srcdir)/../gnulib/import" \
-	"VPATH=$(abs_top_srcdir)/../gnulib/import:$(abs_top_srcdir)"
+GNULIB_BUILDDIR = build-gnulib-gdbserver
+LIBGNU = $(GNULIB_BUILDDIR)/import/libgnu.a
+INCGNU = -I$(srcdir)/../gnulib/import -I$(GNULIB_BUILDDIR)/import
 
 # Generated headers in the gnulib directory.  These must be listed
 # so that they are generated before other files are compiled.
-GNULIB_H = gnulib/import/string.h @GNULIB_STDINT_H@
+GNULIB_H = $(GNULIB_BUILDDIR)/import/string.h @GNULIB_STDINT_H@
 
 # All the includes used for CFLAGS and for lint.
 # -I. for config files.
@@ -175,6 +168,15 @@ XML_BUILTIN = @srv_xmlbuiltin@
 IPA_DEPFILES = @IPA_DEPFILES@
 extra_libraries = @extra_libraries@
 
+SUBDIRS = $(GNULIB_BUILDDIR)
+CLEANDIRS = $(SUBDIRS)
+
+# List of subdirectories in the build tree that must exist.
+# This is used to force build failures in existing trees when
+# a new directory is added.
+# The format here is for the `case' shell command.
+REQUIRED_SUBDIRS = $(GNULIB_BUILDDIR)
+
 FLAGS_TO_PASS = \
 	"prefix=$(prefix)" \
 	"exec_prefix=$(exec_prefix)" \
@@ -216,7 +218,7 @@ generated_files = config.h $(GNULIB_H)
 	${CC} -c ${INTERNAL_CFLAGS} $<
 
 all: gdbserver$(EXEEXT) gdbreplay$(EXEEXT) $(extra_libraries)
-	@cd gnulib/import; $(MAKE) $(FLAGS_TO_PASS) $(GNULIB_FLAGS_TO_PASS) all
+	@$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
 
 # Traditionally "install" depends on "all".  But it may be useful
 # not to; for example, if the user has made some trivial change to a
@@ -237,13 +239,13 @@ install-only:
 	$(INSTALL_PROGRAM) gdbserver$(EXEEXT) $(DESTDIR)$(bindir)/$$n$(EXEEXT); \
 	$(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)$(man1dir); \
 	$(INSTALL_DATA) $(srcdir)/gdbserver.1 $(DESTDIR)$(man1dir)/$$n.1
-	@cd gnulib/import; $(MAKE) $(FLAGS_TO_PASS) $(GNULIB_FLAGS_TO_PASS) install
+	@$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
 
 uninstall: force
 	n=`echo gdbserver | sed '$(program_transform_name)'`; \
 	if [ x$$n = x ]; then n=gdbserver; else true; fi; \
 	rm -f $(DESTDIR)/$(bindir)/$$n$(EXEEXT) $(DESTDIR)$(man1dir)/$$n.1
-	@cd gnulib/import; $(MAKE) $(FLAGS_TO_PASS) $(GNULIB_FLAGS_TO_PASS) uninstall
+	@$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
 
 installcheck:
 check:
@@ -253,7 +255,7 @@ install-pdf:
 html:
 install-html:
 clean-info: force
-	@cd gnulib/import; $(MAKE) $(FLAGS_TO_PASS) $(GNULIB_FLAGS_TO_PASS) $@
+	@$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
 
 gdbserver$(EXEEXT): $(OBS) ${ADD_DEPS} ${CDEPS} $(LIBGNU)
 	rm -f gdbserver$(EXEEXT)
@@ -261,9 +263,8 @@ gdbserver$(EXEEXT): $(OBS) ${ADD_DEPS} ${CDEPS} $(LIBGNU)
 	$(LIBGNU) $(GDBSERVER_LIBS) $(XM_CLIBS)
 
 $(LIBGNU) $(GNULIB_H): all-lib
-all-lib: gnulib/import/Makefile
-	@cd gnulib/import/; $(MAKE) $(FLAGS_TO_PASS) $(GNULIB_FLAGS_TO_PASS) all
-
+all-lib: $(GNULIB_BUILDDIR)/Makefile
+	@$(MAKE) $(FLAGS_TO_PASS) DO=all DODIRS=$(GNULIB_BUILDDIR) subdir_do
 .PHONY: all-lib
 
 gdbreplay$(EXEEXT): $(GDBREPLAY_OBS)
@@ -320,12 +321,29 @@ clean:
 	rm -f i386-mmx.c i386-mmx-linux.c
 	rm -f x32.c x32-linux.c
 	rm -f x32-avx.c x32-avx-linux.c
-	@cd gnulib/import; $(MAKE) $(FLAGS_TO_PASS) $(GNULIB_FLAGS_TO_PASS) clean
+	@$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
 
 maintainer-clean realclean distclean: clean
-	rm -f nm.h tm.h xm.h config.h stamp-h config.log
-	@cd gnulib/import; $(MAKE) $(FLAGS_TO_PASS) $(GNULIB_FLAGS_TO_PASS) $@
-	rm -f Makefile config.status
+	@$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
+	rm -rf $(GNULIB_BUILDDIR)
+	rm -f Makefile config.status config.h stamp-h config.log
+	rm -f Makefile
+
+subdir_do: force
+	@for i in $(DODIRS); do \
+		case $$i in \
+		$(REQUIRED_SUBDIRS)) \
+			if [ ! -f ./$$i/Makefile ] ; then \
+				echo "Missing $$i/Makefile" >&2 ; \
+				exit 1 ; \
+			fi ;; \
+		esac ; \
+		if [ -f ./$$i/Makefile ] ; then \
+			if (cd ./$$i; \
+				$(MAKE) $(FLAGS_TO_PASS) $(DO)) ; then true ; \
+			else exit 1 ; fi ; \
+		else true ; fi ; \
+	done
 
 config.h: stamp-h ; @true
 stamp-h: config.in config.status
@@ -334,11 +352,12 @@ stamp-h: config.in config.status
 Makefile: Makefile.in config.status
 	CONFIG_HEADERS="" $(SHELL) ./config.status
 
-gnulib/import/Makefile: $(srcdir)/../gnulib/import/Makefile.in config.status
+$(GNULIB_BUILDDIR)/Makefile: $(srcdir)/../gnulib/Makefile.in config.status
+	  @cd $(GNULIB_BUILDDIR); CONFIG_FILES="Makefile" \
 	  CONFIG_COMMANDS="depfiles" \
 	  CONFIG_HEADERS= \
 	  CONFIG_LINKS= \
-	  $(SHELL) config.status "gnulib/import/Makefile"
+	  $(SHELL) config.status
 
 config.status: configure configure.srv
 	$(SHELL) ./config.status --recheck
diff --git a/gdb/gdbserver/acinclude.m4 b/gdb/gdbserver/acinclude.m4
index 12eb12b..037cc32 100644
--- a/gdb/gdbserver/acinclude.m4
+++ b/gdb/gdbserver/acinclude.m4
@@ -1,6 +1,8 @@
 dnl gdb/gdbserver/configure.in uses BFD_HAVE_SYS_PROCFS_TYPE.
 sinclude(../../bfd/bfd.m4)
 
+sinclude(../acx_configure_dir.m4)
+
 dnl This gets autoconf bugfixes
 sinclude(../../config/override.m4)
 
diff --git a/gdb/gdbserver/configure.ac b/gdb/gdbserver/configure.ac
index ebbe571..7013a21 100644
--- a/gdb/gdbserver/configure.ac
+++ b/gdb/gdbserver/configure.ac
@@ -26,12 +26,12 @@ AC_CONFIG_HEADER(config.h:config.in)
 AM_MAINTAINER_MODE
 
 AC_PROG_CC
-gl_EARLY
 AC_GNU_SOURCE
 
 AC_CANONICAL_SYSTEM
 
 AC_PROG_INSTALL
+AC_PROG_RANLIB
 
 AC_ARG_PROGRAM
 
@@ -43,6 +43,13 @@ AC_FUNC_ALLOCA
 # Check for the 'make' the user wants to use.
 AC_CHECK_PROGS(MAKE, make)
 
+# Configure gnulib.  We can't use AC_CONFIG_SUBDIRS as that'd expect
+# to find the the source subdir to be configured directly under
+# gdbserver/.  We need to build gnulib under some other directory not
+# "gnulib", to avoid the problem of both GDB and GDBserver wanting to
+# build it in the same directory, when building in the source dir.
+ACX_CONFIGURE_DIR(["../gnulib"], ["build-gnulib-gdbserver"])
+
 AC_CHECK_HEADERS(sgtty.h termio.h termios.h sys/reg.h string.h dnl
 		 proc_service.h sys/procfs.h thread_db.h linux/elf.h dnl
 		 stdlib.h unistd.h dnl
@@ -439,18 +446,15 @@ AC_SUBST(srv_xmlfiles)
 AC_SUBST(IPA_DEPFILES)
 AC_SUBST(extra_libraries)
 
-gl_INIT
-# GDBserver does not use automake, but gnulib does.  This line lets
-# us generate its Makefile.in.
-AM_INIT_AUTOMAKE(gdbserver, UNUSED-VERSION, [no-define])
+GNULIB=build-gnulib-gdbserver/import
 
 GNULIB_STDINT_H=
 if test x"$STDINT_H" != x; then
-  GNULIB_STDINT_H=gnulib/$STDINT_H
+  GNULIB_STDINT_H=$GNULIB/$STDINT_H
 fi
 AC_SUBST(GNULIB_STDINT_H)
 
-AC_OUTPUT(Makefile gnulib/import/Makefile:${srcdir}/../gnulib/import/Makefile.in,
+AC_OUTPUT(Makefile,
 [case x$CONFIG_HEADERS in
 xconfig.h:config.in)
 echo > stamp-h ;;
diff --git a/gdb/gnulib/Makefile.in b/gdb/gnulib/Makefile.in
new file mode 100644
index 0000000..e2370f0
--- /dev/null
+++ b/gdb/gnulib/Makefile.in
@@ -0,0 +1,267 @@
+# Copyright (C) 1989-2012 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/>.
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+host_alias = @host_alias@
+target_alias = @target_alias@
+program_transform_name = @program_transform_name@
+bindir = @bindir@
+libdir = @libdir@
+tooldir = $(libdir)/$(target_alias)
+
+datadir = @datadir@
+localedir = @localedir@
+mandir = @mandir@
+man1dir = $(mandir)/man1
+man2dir = $(mandir)/man2
+man3dir = $(mandir)/man3
+man4dir = $(mandir)/man4
+man5dir = $(mandir)/man5
+man6dir = $(mandir)/man6
+man7dir = $(mandir)/man7
+man8dir = $(mandir)/man8
+man9dir = $(mandir)/man9
+infodir = @infodir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+htmldir = @htmldir@
+pdfdir = @pdfdir@
+includedir = @includedir@
+
+SHELL = @SHELL@
+EXEEXT = @EXEEXT@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+
+DESTDIR =
+
+AR = @AR@
+AR_FLAGS = qv
+RANLIB = @RANLIB@
+DLLTOOL = @DLLTOOL@
+
+SUBDIRS = import
+CLEANDIRS = $(SUBDIRS)
+REQUIRED_SUBDIRS = $(SUBDIRS)
+
+# If you are compiling with GCC, make sure that either 1) You have the
+# fixed include files where GCC can reach them, or 2) You use the
+# -traditional flag.  Otherwise the ioctl calls in inflow.c
+# will be incorrectly compiled.  The "fixincludes" script in the gcc
+# distribution will fix your include files up.
+CC=@CC@
+
+# Directory containing source files.
+srcdir = @srcdir@
+VPATH = @srcdir@
+
+CC_LD=$(CC)
+
+# CFLAGS is specifically reserved for setting from the command line
+# when running make.  I.E.  "make CFLAGS=-Wmissing-prototypes".
+CFLAGS = @CFLAGS@
+
+# LDFLAGS is specifically reserved for setting from the command line
+# when running make.
+LDFLAGS = @LDFLAGS@
+
+FLAGS_TO_PASS = \
+	"prefix=$(prefix)" \
+	"exec_prefix=$(exec_prefix)" \
+	"infodir=$(infodir)" \
+	"datarootdir=$(datarootdir)" \
+	"docdir=$(docdir)" \
+	"htmldir=$(htmldir)" \
+	"pdfdir=$(pdfdir)" \
+	"libdir=$(libdir)" \
+	"mandir=$(mandir)" \
+	"datadir=$(datadir)" \
+	"includedir=$(includedir)" \
+	"against=$(against)" \
+	"DESTDIR=$(DESTDIR)" \
+	"AR=$(AR)" \
+	"AR_FLAGS=$(AR_FLAGS)" \
+	"CC=$(CC)" \
+	"CFLAGS=$(CFLAGS)" \
+	"CXX=$(CXX)" \
+	"CXXFLAGS=$(CXXFLAGS)" \
+	"DLLTOOL=$(DLLTOOL)" \
+	"LDFLAGS=$(LDFLAGS)" \
+	"RANLIB=$(RANLIB)" \
+	"MAKEINFO=$(MAKEINFO)" \
+	"MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \
+	"MAKEINFO_EXTRA_FLAGS=$(MAKEINFO_EXTRA_FLAGS)" \
+	"MAKEHTML=$(MAKEHTML)" \
+	"MAKEHTMLFLAGS=$(MAKEHTMLFLAGS)" \
+	"INSTALL=$(INSTALL)" \
+	"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
+	"INSTALL_DATA=$(INSTALL_DATA)" \
+	"RUNTEST=$(RUNTEST)" \
+	"RUNTESTFLAGS=$(RUNTESTFLAGS)"
+
+all installcheck check info install-info clean-info dvi pdf install-pdf html install-html: force
+	@$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
+
+# Traditionally "install" depends on "all".  But it may be useful
+# not to; for example, if the user has made some trivial change to a
+# source file and doesn't care about rebuilding or just wants to save the
+# time it takes for make to check that all is up to date.
+# install-only is intended to address that need.
+install: all
+	@$(MAKE) $(FLAGS_TO_PASS) install-only
+
+install-only: $(CONFIG_INSTALL)
+	@$(MAKE) DO=install "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do
+
+uninstall: force $(CONFIG_UNINSTALL)
+	@$(MAKE) DO=uninstall "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do
+
+# Convenience rule to handle recursion.
+$(LIBGNU) $(GNULIB_H): all-lib
+all-lib: import/Makefile
+	@$(MAKE) $(FLAGS_TO_PASS) DO=all DODIRS=import subdir_do
+.PHONY: all-lib
+
+clean mostlyclean: $(CONFIG_CLEAN)
+	@$(MAKE) $(FLAGS_TO_PASS) DO=clean "DODIRS=$(CLEANDIRS)" subdir_do
+
+distclean: clean
+	@$(MAKE) $(FLAGS_TO_PASS) DO=distclean "DODIRS=$(CLEANDIRS)" subdir_do
+	rm -f config.status config.h stamp-h
+	rm -f config.log config.cache
+	rm -f Makefile
+	rm -rf $(DEPDIR)
+
+maintainer-clean: local-maintainer-clean do-maintainer-clean distclean
+realclean: maintainer-clean
+
+local-maintainer-clean:
+	@echo "This command is intended for maintainers to use;"
+	@echo "it deletes files that may require special tools to rebuild."
+	rm -f config.status
+
+do-maintainer-clean:
+	@$(MAKE) $(FLAGS_TO_PASS) DO=maintainer-clean "DODIRS=$(CLEANDIRS)" \
+		subdir_do
+
+subdir_do: force
+	@for i in $(DODIRS); do \
+		case $$i in \
+		$(REQUIRED_SUBDIRS)) \
+			if [ ! -f ./$$i/Makefile ] ; then \
+				echo "Missing $$i/Makefile" >&2 ; \
+				exit 1 ; \
+			fi ;; \
+		esac ; \
+		if [ -f ./$$i/Makefile ] ; then \
+			if (cd ./$$i; \
+				$(MAKE) $(FLAGS_TO_PASS) $(DO)) ; then true ; \
+			else exit 1 ; fi ; \
+		else true ; fi ; \
+	done
+
+Makefile: Makefile.in config.status
+	# Regenerate the Makefile.
+	CONFIG_FILES="Makefile" \
+	  CONFIG_COMMANDS= \
+	  CONFIG_HEADERS= \
+	  $(SHELL) config.status
+
+gnulib/Makefile: gnulib/Makefile.in config.status
+	CONFIG_FILES="gnulib/Makefile" \
+	  CONFIG_COMMANDS="depfiles" \
+	  CONFIG_HEADERS= \
+	  CONFIG_LINKS= \
+	  $(SHELL) config.status
+
+config.h: stamp-h ; @true
+stamp-h: $(srcdir)/config.in config.status
+	CONFIG_HEADERS=config.h:config.in \
+	  CONFIG_COMMANDS="default depdir" \
+	  CONFIG_FILES= \
+	  CONFIG_LINKS= \
+	  $(SHELL) config.status
+
+config.status: $(srcdir)/configure
+	$(SHELL) config.status --recheck
+
+ACLOCAL = aclocal
+ACLOCAL_AMFLAGS = -I import/m4 -I ../../config
+aclocal_m4_deps = \
+	configure.ac \
+	import/m4/00gnulib.m4 \
+	import/m4/extensions.m4 \
+	import/m4/gnulib-cache.m4 \
+	import/m4/gnulib-common.m4 \
+	import/m4/gnulib-comp.m4 \
+	import/m4/gnulib-tool.m4 \
+	import/m4/include_next.m4 \
+	import/m4/inttypes.m4 \
+	import/m4/inttypes-pri.m4 \
+	import/m4/longlong.m4 \
+	import/m4/memchr.m4 \
+	import/m4/memmem.m4 \
+	import/m4/mmap-anon.m4 \
+	import/m4/multiarch.m4 \
+	import/m4/onceonly.m4 \
+	import/m4/stddef_h.m4 \
+	import/m4/stdint.m4 \
+	import/m4/string_h.m4 \
+	import/m4/warn-on-use.m4 \
+	import/m4/wchar_t.m4
+
+$(srcdir)/aclocal.m4: @MAINTAINER_MODE_TRUE@ $(aclocal_m4_deps)
+	cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+
+AUTOCONF = autoconf
+configure_deps = $(srcdir)/configure.ac $(srcdir)/aclocal.m4
+$(srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(configure_deps)
+	cd $(srcdir) && $(AUTOCONF)
+
+AUTOHEADER = autoheader
+$(srcdir)/config.in: @MAINTAINER_MODE_TRUE@ $(configure_deps)
+	cd $(srcdir) && $(AUTOHEADER)
+	rm -f stamp-h
+	touch $@
+
+# automatic rebuilding in automake-generated Makefiles requires
+# this rule in the toplevel Makefile, which, with GNU make, causes
+# the desired updates through the implicit regeneration of the Makefile
+# and all of its prerequisites.
+am--refresh:
+	@:
+
+force:
+
+force_update:
+
+# GNU Make has an annoying habit of putting *all* the Makefile variables
+# into the environment, unless you include this target as a circumvention.
+# Rumor is that this will be fixed (and this target can be removed)
+# in GNU Make 4.0.
+.NOEXPORT:
+
+# GNU Make 3.63 has a different problem: it keeps tacking command line
+# overrides onto the definition of $(MAKE).  This variable setting
+# will remove them.
+MAKEOVERRIDES=
+
+### end of the libgnu Makefile.in.
diff --git a/gdb/gnulib/configure.ac b/gdb/gnulib/configure.ac
new file mode 100644
index 0000000..1b0cd6a
--- /dev/null
+++ b/gdb/gnulib/configure.ac
@@ -0,0 +1,62 @@
+dnl Autoconf configure script for GDB, the GNU debugger.
+dnl Copyright (C) 1995-2012 Free Software Foundation, Inc.
+dnl
+dnl This file is part of GDB.
+dnl
+dnl This program is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 3 of the License, or
+dnl (at your option) any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+dnl GNU General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+dnl Process this file with autoconf to produce a configure script.
+
+AC_PREREQ(2.64)dnl
+AC_INIT(import/dummy.c)
+AC_CONFIG_HEADER(config.h:config.in)
+AM_MAINTAINER_MODE
+
+AC_PROG_CC
+AC_USE_SYSTEM_EXTENSIONS
+gl_EARLY
+AM_PROG_CC_STDC
+
+AC_CONFIG_AUX_DIR(../..)
+AC_CANONICAL_SYSTEM
+
+gl_INIT
+
+# We don't use automake, but gnulib does.  This line lets us generate
+# its Makefile.in.
+AM_INIT_AUTOMAKE(libgnu, UNUSED-VERSION, [no-define])
+
+# --------------------- #
+# Checks for programs.  #
+# --------------------- #
+
+AC_PROG_INSTALL
+AC_PROG_LN_S
+AC_PROG_RANLIB
+
+AC_CHECK_TOOL(AR, ar)
+
+# ---------------------- #
+# Checks for libraries.  #
+# ---------------------- #
+
+AC_OUTPUT(Makefile import/Makefile,
+[
+case x$CONFIG_HEADERS in
+xconfig.h:config.in)
+echo > stamp-h ;;
+esac
+])
+
+exit 0
diff --git a/gdb/gnulib/import/Makefile.am b/gdb/gnulib/import/Makefile.am
index c50c582..5ca3689 100644
--- a/gdb/gnulib/import/Makefile.am
+++ b/gdb/gnulib/import/Makefile.am
@@ -21,7 +21,7 @@
 # the same distribution terms as the rest of that program.
 #
 # Generated by gnulib-tool.
-# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=gnulib/import --m4-base=gnulib/import/m4 --doc-base=doc --tests-base=tests --aux-dir=gnulib/import/extra --no-conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files inttypes memmem update-copyright
+# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=import --m4-base=import/m4 --doc-base=doc --tests-base=tests --aux-dir=import/extra --no-conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files inttypes memmem update-copyright
 
 AUTOMAKE_OPTIONS = 1.5 gnits
 
@@ -122,17 +122,17 @@ BUILT_SOURCES += arg-nonnull.h
 # The arg-nonnull.h that gets inserted into generated .h files is the same as
 # build-aux/snippet/arg-nonnull.h, except that it has the copyright header cut
 # off.
-arg-nonnull.h: $(top_srcdir)/gnulib/import/extra/snippet/arg-nonnull.h
+arg-nonnull.h: $(top_srcdir)/import/extra/snippet/arg-nonnull.h
 	$(AM_V_GEN)rm -f $@-t $@ && \
 	sed -n -e '/GL_ARG_NONNULL/,$$p' \
-	  < $(top_srcdir)/gnulib/import/extra/snippet/arg-nonnull.h \
+	  < $(top_srcdir)/import/extra/snippet/arg-nonnull.h \
 	  > $@-t && \
 	mv $@-t $@
 MOSTLYCLEANFILES += arg-nonnull.h arg-nonnull.h-t
 
 ARG_NONNULL_H=arg-nonnull.h
 
-EXTRA_DIST += $(top_srcdir)/gnulib/import/extra/snippet/arg-nonnull.h
+EXTRA_DIST += $(top_srcdir)/import/extra/snippet/arg-nonnull.h
 
 ## end   gnulib module snippet/arg-nonnull
 
@@ -146,17 +146,17 @@ EXTRA_DIST += $(top_srcdir)/gnulib/import/extra/snippet/arg-nonnull.h
 BUILT_SOURCES += c++defs.h
 # The c++defs.h that gets inserted into generated .h files is the same as
 # build-aux/snippet/c++defs.h, except that it has the copyright header cut off.
-c++defs.h: $(top_srcdir)/gnulib/import/extra/snippet/c++defs.h
+c++defs.h: $(top_srcdir)/import/extra/snippet/c++defs.h
 	$(AM_V_GEN)rm -f $@-t $@ && \
 	sed -n -e '/_GL_CXXDEFS/,$$p' \
-	  < $(top_srcdir)/gnulib/import/extra/snippet/c++defs.h \
+	  < $(top_srcdir)/import/extra/snippet/c++defs.h \
 	  > $@-t && \
 	mv $@-t $@
 MOSTLYCLEANFILES += c++defs.h c++defs.h-t
 
 CXXDEFS_H=c++defs.h
 
-EXTRA_DIST += $(top_srcdir)/gnulib/import/extra/snippet/c++defs.h
+EXTRA_DIST += $(top_srcdir)/import/extra/snippet/c++defs.h
 
 ## end   gnulib module snippet/c++defs
 
@@ -166,17 +166,17 @@ BUILT_SOURCES += warn-on-use.h
 # The warn-on-use.h that gets inserted into generated .h files is the same as
 # build-aux/snippet/warn-on-use.h, except that it has the copyright header cut
 # off.
-warn-on-use.h: $(top_srcdir)/gnulib/import/extra/snippet/warn-on-use.h
+warn-on-use.h: $(top_srcdir)/import/extra/snippet/warn-on-use.h
 	$(AM_V_GEN)rm -f $@-t $@ && \
 	sed -n -e '/^.ifndef/,$$p' \
-	  < $(top_srcdir)/gnulib/import/extra/snippet/warn-on-use.h \
+	  < $(top_srcdir)/import/extra/snippet/warn-on-use.h \
 	  > $@-t && \
 	mv $@-t $@
 MOSTLYCLEANFILES += warn-on-use.h warn-on-use.h-t
 
 WARN_ON_USE_H=warn-on-use.h
 
-EXTRA_DIST += $(top_srcdir)/gnulib/import/extra/snippet/warn-on-use.h
+EXTRA_DIST += $(top_srcdir)/import/extra/snippet/warn-on-use.h
 
 ## end   gnulib module snippet/warn-on-use
 
@@ -363,7 +363,7 @@ EXTRA_DIST += string.in.h
 ## begin gnulib module update-copyright
 
 
-EXTRA_DIST += $(top_srcdir)/gnulib/import/extra/update-copyright
+EXTRA_DIST += $(top_srcdir)/import/extra/update-copyright
 
 ## end   gnulib module update-copyright
 
diff --git a/gdb/gnulib/import/Makefile.in b/gdb/gnulib/import/Makefile.in
index 206725d..63dd1e0 100644
--- a/gdb/gnulib/import/Makefile.in
+++ b/gdb/gnulib/import/Makefile.in
@@ -36,7 +36,7 @@
 # the same distribution terms as the rest of that program.
 #
 # Generated by gnulib-tool.
-# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=gnulib/import --m4-base=gnulib/import/m4 --doc-base=doc --tests-base=tests --aux-dir=gnulib/import/extra --no-conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files inttypes memmem update-copyright
+# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=import --m4-base=import/m4 --doc-base=doc --tests-base=tests --aux-dir=import/extra --no-conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files inttypes memmem update-copyright
 
 
 
@@ -60,46 +60,31 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 target_triplet = @target@
-subdir = gnulib/import
+subdir = import
 DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
 	$(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/../config/largefile.m4 \
-	$(top_srcdir)/../config/lead-dot.m4 \
-	$(top_srcdir)/../config/plugins.m4 \
-	$(top_srcdir)/gnulib/import/m4/00gnulib.m4 \
-	$(top_srcdir)/gnulib/import/m4/extensions.m4 \
-	$(top_srcdir)/gnulib/import/m4/gnulib-common.m4 \
-	$(top_srcdir)/gnulib/import/m4/gnulib-comp.m4 \
-	$(top_srcdir)/gnulib/import/m4/include_next.m4 \
-	$(top_srcdir)/gnulib/import/m4/inttypes-pri.m4 \
-	$(top_srcdir)/gnulib/import/m4/inttypes.m4 \
-	$(top_srcdir)/gnulib/import/m4/longlong.m4 \
-	$(top_srcdir)/gnulib/import/m4/memchr.m4 \
-	$(top_srcdir)/gnulib/import/m4/memmem.m4 \
-	$(top_srcdir)/gnulib/import/m4/mmap-anon.m4 \
-	$(top_srcdir)/gnulib/import/m4/multiarch.m4 \
-	$(top_srcdir)/gnulib/import/m4/onceonly.m4 \
-	$(top_srcdir)/gnulib/import/m4/stddef_h.m4 \
-	$(top_srcdir)/gnulib/import/m4/stdint.m4 \
-	$(top_srcdir)/gnulib/import/m4/string_h.m4 \
-	$(top_srcdir)/gnulib/import/m4/warn-on-use.m4 \
-	$(top_srcdir)/gnulib/import/m4/wchar_t.m4 \
-	$(top_srcdir)/acinclude.m4 $(top_srcdir)/../bfd/bfd.m4 \
-	$(top_srcdir)/../config/acinclude.m4 \
-	$(top_srcdir)/../config/override.m4 \
-	$(top_srcdir)/../config/gettext-sister.m4 \
-	$(top_srcdir)/../config/lib-ld.m4 \
-	$(top_srcdir)/../config/lib-prefix.m4 \
-	$(top_srcdir)/../config/lib-link.m4 \
-	$(top_srcdir)/../config/acx.m4 $(top_srcdir)/../config/tcl.m4 \
-	$(top_srcdir)/../config/depstand.m4 \
-	$(top_srcdir)/../config/lcmessage.m4 \
-	$(top_srcdir)/../config/codeset.m4 \
-	$(top_srcdir)/../config/zlib.m4 $(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/import/m4/00gnulib.m4 \
+	$(top_srcdir)/import/m4/extensions.m4 \
+	$(top_srcdir)/import/m4/gnulib-common.m4 \
+	$(top_srcdir)/import/m4/gnulib-comp.m4 \
+	$(top_srcdir)/import/m4/include_next.m4 \
+	$(top_srcdir)/import/m4/inttypes-pri.m4 \
+	$(top_srcdir)/import/m4/inttypes.m4 \
+	$(top_srcdir)/import/m4/longlong.m4 \
+	$(top_srcdir)/import/m4/memchr.m4 \
+	$(top_srcdir)/import/m4/memmem.m4 \
+	$(top_srcdir)/import/m4/mmap-anon.m4 \
+	$(top_srcdir)/import/m4/multiarch.m4 \
+	$(top_srcdir)/import/m4/onceonly.m4 \
+	$(top_srcdir)/import/m4/stddef_h.m4 \
+	$(top_srcdir)/import/m4/stdint.m4 \
+	$(top_srcdir)/import/m4/string_h.m4 \
+	$(top_srcdir)/import/m4/warn-on-use.m4 \
+	$(top_srcdir)/import/m4/wchar_t.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
+mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -110,7 +95,7 @@ am_libgnu_a_OBJECTS = dummy.$(OBJEXT)
 libgnu_a_OBJECTS = $(am_libgnu_a_OBJECTS)
 LTLIBRARIES = $(noinst_LTLIBRARIES)
 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/../depcomp
+depcomp = $(SHELL) $(top_srcdir)/../../depcomp
 am__depfiles_maybe = depfiles
 am__mv = mv -f
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
@@ -162,7 +147,6 @@ am__relativize = \
   done; \
   reldir="$$dir2"
 ACLOCAL = @ACLOCAL@
-ALLOCA = @ALLOCA@
 AMTAR = @AMTAR@
 APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
 AR = @AR@
@@ -176,40 +160,19 @@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@
 BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@
 BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@
 BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@
-CATALOGS = @CATALOGS@
-CATOBJEXT = @CATOBJEXT@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
-CONFIG_ALL = @CONFIG_ALL@
-CONFIG_CLEAN = @CONFIG_CLEAN@
-CONFIG_DEPS = @CONFIG_DEPS@
-CONFIG_INSTALL = @CONFIG_INSTALL@
-CONFIG_LDFLAGS = @CONFIG_LDFLAGS@
-CONFIG_OBS = @CONFIG_OBS@
-CONFIG_SRCS = @CONFIG_SRCS@
-CONFIG_UNINSTALL = @CONFIG_UNINSTALL@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
-DATADIRNAME = @DATADIRNAME@
-DEBUGDIR = @DEBUGDIR@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
-DLLTOOL = @DLLTOOL@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
-ENABLE_CFLAGS = @ENABLE_CFLAGS@
 EXEEXT = @EXEEXT@
-GDBTKLIBS = @GDBTKLIBS@
-GDBTK_CFLAGS = @GDBTK_CFLAGS@
-GDBTK_SRC_DIR = @GDBTK_SRC_DIR@
-GDB_DATADIR = @GDB_DATADIR@
-GDB_NM_FILE = @GDB_NM_FILE@
-GENCAT = @GENCAT@
-GMSGFMT = @GMSGFMT@
 GNULIB_FFSL = @GNULIB_FFSL@
 GNULIB_FFSLL = @GNULIB_FFSLL@
 GNULIB_IMAXABS = @GNULIB_IMAXABS@
@@ -233,7 +196,6 @@ GNULIB_MEMMEM = @GNULIB_MEMMEM@
 GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
 GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
 GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
-GNULIB_STDINT_H = @GNULIB_STDINT_H@
 GNULIB_STPCPY = @GNULIB_STPCPY@
 GNULIB_STPNCPY = @GNULIB_STPNCPY@
 GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
@@ -253,7 +215,6 @@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
 GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@
 GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@
 GREP = @GREP@
-GUI_CFLAGS_X = @GUI_CFLAGS_X@
 HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@
 HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@
 HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
@@ -269,7 +230,6 @@ HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@
 HAVE_FFSL = @HAVE_FFSL@
 HAVE_FFSLL = @HAVE_FFSLL@
 HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
-HAVE_LIBEXPAT = @HAVE_LIBEXPAT@
 HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
 HAVE_MBSLEN = @HAVE_MBSLEN@
 HAVE_MEMCHR = @HAVE_MEMCHR@
@@ -292,7 +252,6 @@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
 HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@
 HAVE_WCHAR_H = @HAVE_WCHAR_H@
 HAVE_WCHAR_T = @HAVE_WCHAR_T@
-INCINTL = @INCINTL@
 INCLUDE_NEXT = @INCLUDE_NEXT@
 INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@
 INSTALL = @INSTALL@
@@ -300,28 +259,17 @@ INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INSTOBJEXT = @INSTOBJEXT@
 INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@
 INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@
-JIT_READER_DIR = @JIT_READER_DIR@
 LDFLAGS = @LDFLAGS@
-LIBEXPAT = @LIBEXPAT@
 LIBGNU_LIBDEPS = @LIBGNU_LIBDEPS@
 LIBGNU_LTLIBDEPS = @LIBGNU_LTLIBDEPS@
-LIBGUI = @LIBGUI@
-LIBINTL = @LIBINTL@
-LIBINTL_DEP = @LIBINTL_DEP@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LN_S = @LN_S@
-LTLIBEXPAT = @LTLIBEXPAT@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
-MAKE = @MAKE@
 MAKEINFO = @MAKEINFO@
-MAKEINFOFLAGS = @MAKEINFOFLAGS@
-MAKEINFO_EXTRA_FLAGS = @MAKEINFO_EXTRA_FLAGS@
-MIG = @MIG@
 MKDIR_P = @MKDIR_P@
 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@
 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@
@@ -340,23 +288,12 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
-PKGVERSION = @PKGVERSION@
-POSUB = @POSUB@
 PRAGMA_COLUMNS = @PRAGMA_COLUMNS@
 PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
 PRIPTR_PREFIX = @PRIPTR_PREFIX@
 PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@
-PROFILE_CFLAGS = @PROFILE_CFLAGS@
 PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
-PYTHON_CFLAGS = @PYTHON_CFLAGS@
-PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
-PYTHON_LIBS = @PYTHON_LIBS@
 RANLIB = @RANLIB@
-RDYNAMIC = @RDYNAMIC@
-READLINE = @READLINE@
-READLINE_CFLAGS = @READLINE_CFLAGS@
-READLINE_DEPS = @READLINE_DEPS@
-READLINE_TEXI_INCFLAG = @READLINE_TEXI_INCFLAG@
 REPLACE_MEMCHR = @REPLACE_MEMCHR@
 REPLACE_MEMMEM = @REPLACE_MEMMEM@
 REPLACE_NULL = @REPLACE_NULL@
@@ -373,67 +310,19 @@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@
 REPLACE_STRSTR = @REPLACE_STRSTR@
 REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@
 REPLACE_STRTOK_R = @REPLACE_STRTOK_R@
-REPORT_BUGS_TEXI = @REPORT_BUGS_TEXI@
-REPORT_BUGS_TO = @REPORT_BUGS_TO@
-SER_HARDWIRE = @SER_HARDWIRE@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
-SIM = @SIM@
-SIM_OBS = @SIM_OBS@
 SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
 STDDEF_H = @STDDEF_H@
 STDINT_H = @STDINT_H@
 STRIP = @STRIP@
-SYSTEM_GDBINIT = @SYSTEM_GDBINIT@
-TARGET_OBS = @TARGET_OBS@
-TARGET_PTR = @TARGET_PTR@
-TARGET_SYSTEM_ROOT = @TARGET_SYSTEM_ROOT@
-TCL_BIN_DIR = @TCL_BIN_DIR@
-TCL_DEPS = @TCL_DEPS@
-TCL_INCLUDE = @TCL_INCLUDE@
-TCL_LIBRARY = @TCL_LIBRARY@
-TCL_LIB_FILE = @TCL_LIB_FILE@
-TCL_LIB_FLAG = @TCL_LIB_FLAG@
-TCL_LIB_SPEC = @TCL_LIB_SPEC@
-TCL_PATCH_LEVEL = @TCL_PATCH_LEVEL@
-TCL_SRC_DIR = @TCL_SRC_DIR@
-TCL_STUB_LIB_FILE = @TCL_STUB_LIB_FILE@
-TCL_STUB_LIB_FLAG = @TCL_STUB_LIB_FLAG@
-TCL_STUB_LIB_SPEC = @TCL_STUB_LIB_SPEC@
-TCL_VERSION = @TCL_VERSION@
-TK_BIN_DIR = @TK_BIN_DIR@
-TK_DEPS = @TK_DEPS@
-TK_INCLUDE = @TK_INCLUDE@
-TK_LIBRARY = @TK_LIBRARY@
-TK_LIB_FILE = @TK_LIB_FILE@
-TK_LIB_FLAG = @TK_LIB_FLAG@
-TK_LIB_SPEC = @TK_LIB_SPEC@
-TK_SRC_DIR = @TK_SRC_DIR@
-TK_STUB_LIB_FILE = @TK_STUB_LIB_FILE@
-TK_STUB_LIB_FLAG = @TK_STUB_LIB_FLAG@
-TK_STUB_LIB_SPEC = @TK_STUB_LIB_SPEC@
-TK_VERSION = @TK_VERSION@
-TK_XINCLUDES = @TK_XINCLUDES@
 UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@
 UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@
 UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@
-USE_NLS = @USE_NLS@
 VERSION = @VERSION@
-WARN_CFLAGS = @WARN_CFLAGS@
 WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
-WERROR_CFLAGS = @WERROR_CFLAGS@
-WIN32LDAPP = @WIN32LDAPP@
-WIN32LIBS = @WIN32LIBS@
-WINDRES = @WINDRES@
 WINT_T_SUFFIX = @WINT_T_SUFFIX@
-XGETTEXT = @XGETTEXT@
-XMKMF = @XMKMF@
-X_CFLAGS = @X_CFLAGS@
-X_LDFLAGS = @X_LDFLAGS@
-X_LIBS = @X_LIBS@
-YACC = @YACC@
-YFLAGS = @YFLAGS@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
@@ -456,7 +345,6 @@ datarootdir = @datarootdir@
 docdir = @docdir@
 dvidir = @dvidir@
 exec_prefix = @exec_prefix@
-frags = @frags@
 gl_LIBOBJS = @gl_LIBOBJS@
 gl_LTLIBOBJS = @gl_LTLIBOBJS@
 gltests_LIBOBJS = @gltests_LIBOBJS@
@@ -482,17 +370,14 @@ pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
-python_prog_path = @python_prog_path@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
-subdirs = @subdirs@
 sysconfdir = @sysconfdir@
 target = @target@
 target_alias = @target_alias@
 target_cpu = @target_cpu@
 target_os = @target_os@
-target_subdir = @target_subdir@
 target_vendor = @target_vendor@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
@@ -504,11 +389,11 @@ noinst_LIBRARIES = libgnu.a
 noinst_LTLIBRARIES = 
 EXTRA_DIST = m4/gnulib-cache.m4 inttypes.in.h memchr.c memchr.valgrind \
 	memmem.c str-two-way.h \
-	$(top_srcdir)/gnulib/import/extra/snippet/arg-nonnull.h \
-	$(top_srcdir)/gnulib/import/extra/snippet/c++defs.h \
-	$(top_srcdir)/gnulib/import/extra/snippet/warn-on-use.h \
-	stddef.in.h stdint.in.h string.in.h \
-	$(top_srcdir)/gnulib/import/extra/update-copyright
+	$(top_srcdir)/import/extra/snippet/arg-nonnull.h \
+	$(top_srcdir)/import/extra/snippet/c++defs.h \
+	$(top_srcdir)/import/extra/snippet/warn-on-use.h stddef.in.h \
+	stdint.in.h string.in.h \
+	$(top_srcdir)/import/extra/update-copyright
 
 # The BUILT_SOURCES created by this Makefile snippet are not used via #include
 # statements but through direct file reference. Therefore this snippet must be
@@ -553,9 +438,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__confi
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits gnulib/import/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits import/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --gnits gnulib/import/Makefile
+	  $(AUTOMAKE) --gnits import/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
@@ -973,27 +858,27 @@ inttypes.h: inttypes.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_U
 # The arg-nonnull.h that gets inserted into generated .h files is the same as
 # build-aux/snippet/arg-nonnull.h, except that it has the copyright header cut
 # off.
-arg-nonnull.h: $(top_srcdir)/gnulib/import/extra/snippet/arg-nonnull.h
+arg-nonnull.h: $(top_srcdir)/import/extra/snippet/arg-nonnull.h
 	$(AM_V_GEN)rm -f $@-t $@ && \
 	sed -n -e '/GL_ARG_NONNULL/,$$p' \
-	  < $(top_srcdir)/gnulib/import/extra/snippet/arg-nonnull.h \
+	  < $(top_srcdir)/import/extra/snippet/arg-nonnull.h \
 	  > $@-t && \
 	mv $@-t $@
 # The c++defs.h that gets inserted into generated .h files is the same as
 # build-aux/snippet/c++defs.h, except that it has the copyright header cut off.
-c++defs.h: $(top_srcdir)/gnulib/import/extra/snippet/c++defs.h
+c++defs.h: $(top_srcdir)/import/extra/snippet/c++defs.h
 	$(AM_V_GEN)rm -f $@-t $@ && \
 	sed -n -e '/_GL_CXXDEFS/,$$p' \
-	  < $(top_srcdir)/gnulib/import/extra/snippet/c++defs.h \
+	  < $(top_srcdir)/import/extra/snippet/c++defs.h \
 	  > $@-t && \
 	mv $@-t $@
 # The warn-on-use.h that gets inserted into generated .h files is the same as
 # build-aux/snippet/warn-on-use.h, except that it has the copyright header cut
 # off.
-warn-on-use.h: $(top_srcdir)/gnulib/import/extra/snippet/warn-on-use.h
+warn-on-use.h: $(top_srcdir)/import/extra/snippet/warn-on-use.h
 	$(AM_V_GEN)rm -f $@-t $@ && \
 	sed -n -e '/^.ifndef/,$$p' \
-	  < $(top_srcdir)/gnulib/import/extra/snippet/warn-on-use.h \
+	  < $(top_srcdir)/import/extra/snippet/warn-on-use.h \
 	  > $@-t && \
 	mv $@-t $@
 
diff --git a/gdb/gnulib/import/m4/gnulib-cache.m4 b/gdb/gnulib/import/m4/gnulib-cache.m4
index 9815128..ca089fa 100644
--- a/gdb/gnulib/import/m4/gnulib-cache.m4
+++ b/gdb/gnulib/import/m4/gnulib-cache.m4
@@ -27,7 +27,7 @@
 
 
 # Specification in the form of a command-line invocation:
-#   gnulib-tool --import --dir=. --lib=libgnu --source-base=gnulib/import --m4-base=gnulib/import/m4 --doc-base=doc --tests-base=tests --aux-dir=gnulib/import/extra --no-conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files inttypes memmem update-copyright
+#   gnulib-tool --import --dir=. --lib=libgnu --source-base=import --m4-base=import/m4 --doc-base=doc --tests-base=tests --aux-dir=import/extra --no-conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files inttypes memmem update-copyright
 
 # Specification in the form of a few gnulib-tool.m4 macro invocations:
 gl_LOCAL_DIR([])
@@ -37,8 +37,8 @@ gl_MODULES([
   update-copyright
 ])
 gl_AVOID([])
-gl_SOURCE_BASE([gnulib/import])
-gl_M4_BASE([gnulib/import/m4])
+gl_SOURCE_BASE([import])
+gl_M4_BASE([import/m4])
 gl_PO_BASE([])
 gl_DOC_BASE([doc])
 gl_TESTS_BASE([tests])
diff --git a/gdb/gnulib/import/m4/gnulib-comp.m4 b/gdb/gnulib/import/m4/gnulib-comp.m4
index bde90d3..59c3f15 100644
--- a/gdb/gnulib/import/m4/gnulib-comp.m4
+++ b/gdb/gnulib/import/m4/gnulib-comp.m4
@@ -64,14 +64,14 @@ AC_DEFUN([gl_INIT],
   gl_cond_libtool=false
   gl_libdeps=
   gl_ltlibdeps=
-  gl_m4_base='gnulib/import/m4'
+  gl_m4_base='import/m4'
   m4_pushdef([AC_LIBOBJ], m4_defn([gl_LIBOBJ]))
   m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gl_REPLACE_FUNCS]))
   m4_pushdef([AC_LIBSOURCES], m4_defn([gl_LIBSOURCES]))
   m4_pushdef([gl_LIBSOURCES_LIST], [])
   m4_pushdef([gl_LIBSOURCES_DIR], [])
   gl_COMMON
-  gl_source_base='gnulib/import'
+  gl_source_base='import'
 gl_INTTYPES_H
 gl_INTTYPES_INCOMPLETE
 gl_FUNC_MEMCHR
@@ -197,7 +197,7 @@ AC_DEFUN([gl_REPLACE_FUNCS], [
 AC_DEFUN([gl_LIBSOURCES], [
   m4_foreach([_gl_NAME], [$1], [
     m4_if(_gl_NAME, [alloca.c], [], [
-      m4_define([gl_LIBSOURCES_DIR], [gnulib/import])
+      m4_define([gl_LIBSOURCES_DIR], [import])
       m4_append([gl_LIBSOURCES_LIST], _gl_NAME, [ ])
     ])
   ])
@@ -257,7 +257,6 @@ AC_DEFUN([gl_FILE_LIST], [
   m4/memmem.m4
   m4/mmap-anon.m4
   m4/multiarch.m4
-  m4/onceonly.m4
   m4/stddef_h.m4
   m4/stdint.m4
   m4/string_h.m4


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