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
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 \
# 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.
# 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
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= \
$(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 \