TARGET_SYSTEM_ROOT = @TARGET_SYSTEM_ROOT@
TARGET_SYSTEM_ROOT_DEFINE = @TARGET_SYSTEM_ROOT_DEFINE@
+# Did the user give us a --with-gdb-datadir option?
+GDB_DATADIR = @GDB_DATADIR@
+
# Helper code from gnulib.
LIBGNU = gnulib/libgnu.a
INCGNU = -I$(srcdir)/gnulib -Ignulib
#
SUBDIR_PYTHON_OBS = \
python.o \
- python-cmd.o \
- python-frame.o \
- python-function.o \
- python-objfile.o \
- python-prettyprint.o \
- python-type.o \
- python-utils.o \
- python-value.o
+ py-cmd.o \
+ py-frame.o \
+ py-function.o \
+ py-objfile.o \
+ py-prettyprint.o \
+ py-type.o \
+ py-utils.o \
+ py-value.o
SUBDIR_PYTHON_SRCS = \
python/python.c \
- python/python-cmd.c \
- python/python-frame.c \
- python/python-function.c \
- python/python-objfile.c \
- python/python-prettyprint.c \
- python/python-type.c \
- python/python-utils.c \
- python/python-value.c
+ python/py-cmd.c \
+ python/py-frame.c \
+ python/py-function.c \
+ python/py-objfile.c \
+ python/py-prettyprint.c \
+ python/py-type.c \
+ python/py-utils.c \
+ python/py-value.c
SUBDIR_PYTHON_DEPS =
SUBDIR_PYTHON_LDFLAGS=
SUBDIR_PYTHON_CFLAGS=
xml-tdesc.c xml-support.c \
inferior.c gdb_usleep.c \
record.c \
- jit.c
+ jit.c \
+ xml-syscall.c \
LINTFILES = $(SFILES) $(YYFILES) $(CONFIG_SRCS) init.c
annotate.h sim-regno.h dictionary.h dfp.h main.h frame-unwind.h \
remote-fileio.h i386-linux-tdep.h vax-tdep.h objc-lang.h \
sentinel-frame.h bcache.h symfile.h windows-tdep.h linux-tdep.h \
-gdb_usleep.h jit.h
+gdb_usleep.h jit.h xml-syscall.h ada-operator.inc
# Header files that already have srcdir in them, or which are in objdir.
trad-frame.o \
tramp-frame.o \
solib.o solib-null.o \
- prologue-value.o memory-map.o xml-support.o \
+ prologue-value.o memory-map.o xml-support.o xml-syscall.o \
target-descriptions.o target-memory.o xml-tdesc.o xml-builtin.o \
inferior.o osdata.o gdb_usleep.o record.o \
jit.o
+# Definitions for the syscall's XML files and dir
+XML_SYSCALLS_DIR = syscalls/
+XML_SYSCALLS_FILES = gdb-syscalls.dtd \
+ ppc-linux.xml ppc64-linux.xml \
+ i386-linux.xml amd64-linux.xml
+
TSOBS = inflow.o
SUBDIRS = @subdirs@
$(COMPILE) $<
$(POSTCOMPILE)
-all: gdb$(EXEEXT) $(CONFIG_ALL)
+all: gdb$(EXEEXT) $(CONFIG_ALL) xml-syscall-copy
@$(MAKE) $(FLAGS_TO_PASS) DO=all "DODIRS=`echo $(SUBDIRS) | sed 's/testsuite//'`" subdir_do
.PHONY: all-tui
all-tui: $(TUI)$(EXEEXT)
+# This is needed for running GDB from the build directory
+.PHONY: xml-syscall-copy
+xml-syscall-copy:
+ if [ "`cd $(srcdir) && pwd`" != "`pwd`" ] ; then \
+ mkdir -p ./$(XML_SYSCALLS_DIR) ; \
+ list='$(XML_SYSCALLS_FILES)' ; \
+ for file in $$list ; do \
+ f=$(srcdir)/$(XML_SYSCALLS_DIR)/$$file ; \
+ if test -f $$f ; then \
+ $(INSTALL_DATA) $$f \
+ ./$(XML_SYSCALLS_DIR) ; \
+ fi ; \
+ done ; \
+ fi ;
+
+# This target is responsible for properly installing the syscalls'
+# XML files in the system.
+.PHONY: xml-syscall-install
+xml-syscall-install:
+ $(SHELL) $(srcdir)/../mkinstalldirs \
+ $(DESTDIR)$(GDB_DATADIR)/$(XML_SYSCALLS_DIR) ; \
+ list='$(XML_SYSCALLS_FILES)' ; \
+ for file in $$list ; do \
+ f=$(srcdir)/$(XML_SYSCALLS_DIR)/$$file ; \
+ if test -f $$f ; then \
+ $(INSTALL_DATA) $$f \
+ $(DESTDIR)$(GDB_DATADIR)/$(XML_SYSCALLS_DIR) ; \
+ fi ; \
+ done ;
+
installcheck:
# The check target can not use subdir_do, because subdir_do does not
# 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 install-only
-install-only: $(CONFIG_INSTALL)
+install: all install-only
+
+# The "install-only" target also installs the syscalls' XML files in
+# the system.
+install-only: $(CONFIG_INSTALL) xml-syscall-install
transformed_name=`t='$(program_transform_name)'; \
echo gdb | sed -e "$$t"` ; \
if test "x$$transformed_name" = x; then \
$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/python.c
$(POSTCOMPILE)
-python-cmd.o: $(srcdir)/python/python-cmd.c
- $(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/python-cmd.c
+py-cmd.o: $(srcdir)/python/py-cmd.c
+ $(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-cmd.c
$(POSTCOMPILE)
-python-frame.o: $(srcdir)/python/python-frame.c
- $(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/python-frame.c
+py-frame.o: $(srcdir)/python/py-frame.c
+ $(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-frame.c
$(POSTCOMPILE)
-python-function.o: $(srcdir)/python/python-function.c
- $(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/python-function.c
+py-function.o: $(srcdir)/python/py-function.c
+ $(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-function.c
$(POSTCOMPILE)
-python-objfile.o: $(srcdir)/python/python-objfile.c
- $(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/python-objfile.c
+py-objfile.o: $(srcdir)/python/py-objfile.c
+ $(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-objfile.c
$(POSTCOMPILE)
-python-prettyprint.o: $(srcdir)/python/python-prettyprint.c
- $(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/python-prettyprint.c
+py-prettyprint.o: $(srcdir)/python/py-prettyprint.c
+ $(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-prettyprint.c
$(POSTCOMPILE)
-python-type.o: $(srcdir)/python/python-type.c
- $(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/python-type.c
+py-type.o: $(srcdir)/python/py-type.c
+ $(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-type.c
$(POSTCOMPILE)
-python-utils.o: $(srcdir)/python/python-utils.c
- $(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/python-utils.c
+py-utils.o: $(srcdir)/python/py-utils.c
+ $(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-utils.c
$(POSTCOMPILE)
-python-value.o: $(srcdir)/python/python-value.c
- $(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/python-value.c
+py-value.o: $(srcdir)/python/py-value.c
+ $(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-value.c
$(POSTCOMPILE)
#