-# Copyright (C) 2010-2016 Free Software Foundation, Inc.
+# Copyright (C) 2010-2021 Free Software Foundation, Inc.
# Makefile for building a staged copy of the data-directory.
# This file is part of GDB.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# Please keep lists in this file sorted alphabetically, with one item per line.
+# See gdb/Makefile.in for guidelines on ordering files and directories.
+
srcdir = @srcdir@
SYSCALLS_SRCDIR = $(srcdir)/../syscalls
PYTHON_SRCDIR = $(srcdir)/../python/lib
GUILE_SRCDIR = $(srcdir)/../guile/lib
SYSTEM_GDBINIT_SRCDIR = $(srcdir)/../system-gdbinit
VPATH = $(srcdir):$(SYSCALLS_SRCDIR):$(PYTHON_SRCDIR):$(GUILE_SRCDIR):$(SYSTEM_GDBINIT_SRCDIR)
+XSLTPROC = @XSLTPROC@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
SYSCALLS_DIR = syscalls
SYSCALLS_INSTALL_DIR = $(DESTDIR)$(GDB_DATADIR)/$(SYSCALLS_DIR)
-SYSCALLS_FILES = \
- gdb-syscalls.dtd \
- arm-linux.xml aarch64-linux.xml \
- ppc-linux.xml ppc64-linux.xml \
- i386-linux.xml amd64-linux.xml \
- sparc-linux.xml sparc64-linux.xml \
- mips-o32-linux.xml mips-n32-linux.xml mips-n64-linux.xml \
- s390-linux.xml s390x-linux.xml
+GEN_SYSCALLS_FILES = \
+ aarch64-linux.xml \
+ amd64-linux.xml \
+ arm-linux.xml \
+ i386-linux.xml \
+ mips-n32-linux.xml \
+ mips-n64-linux.xml \
+ mips-o32-linux.xml \
+ ppc-linux.xml \
+ ppc64-linux.xml \
+ s390-linux.xml \
+ s390x-linux.xml \
+ sparc-linux.xml \
+ sparc64-linux.xml
+
+SYSCALLS_FILES = gdb-syscalls.dtd freebsd.xml netbsd.xml $(GEN_SYSCALLS_FILES)
PYTHON_DIR = python
PYTHON_INSTALL_DIR = $(DESTDIR)$(GDB_DATADIR)/$(PYTHON_DIR)
PYTHON_FILE_LIST = \
gdb/__init__.py \
- gdb/frames.py \
- gdb/FrameIterator.py \
gdb/FrameDecorator.py \
- gdb/types.py \
+ gdb/FrameIterator.py \
+ gdb/frames.py \
gdb/printing.py \
- gdb/unwinder.py \
gdb/prompt.py \
+ gdb/types.py \
+ gdb/unwinder.py \
gdb/xmethod.py \
gdb/command/__init__.py \
- gdb/command/xmethods.py \
+ gdb/command/explore.py \
gdb/command/frame_filters.py \
- gdb/command/unwinders.py \
- gdb/command/type_printers.py \
gdb/command/pretty_printers.py \
gdb/command/prompt.py \
- gdb/command/explore.py \
+ gdb/command/type_printers.py \
+ gdb/command/unwinders.py \
+ gdb/command/xmethods.py \
gdb/function/__init__.py \
+ gdb/function/as_string.py \
gdb/function/caller_is.py \
gdb/function/strfns.py \
gdb/printer/__init__.py \
.PHONY: all
all: stamp-syscalls stamp-python stamp-guile stamp-system-gdbinit
+%.xml: @MAINTAINER_MODE_TRUE@ %.xml.in apply-defaults.xsl linux-defaults.xml.in
+ $(XSLTPROC) -o $(SYSCALLS_SRCDIR)/$@ $(SYSCALLS_SRCDIR)/apply-defaults.xsl\
+ $(SYSCALLS_SRCDIR)/$@.in
+
+.PHONY: syscall-xml
+syscall-xml: $(GEN_SYSCALLS_FILES)
+
+.PHONY: clean-syscall-xml
+# Only clean files generated XML files.
+clean-syscall-xml:
+ files='$(GEN_SYSCALLS_FILES)' ; \
+ for file in $$files; do \
+ rm -f "$(SYSCALLS_SRCDIR)/$$file"; \
+ done
+
# For portability's sake, we need to handle systems that don't have
# symbolic links.
stamp-syscalls: Makefile $(SYSCALLS_FILES)
MAKEOVERRIDES=
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) && $(MAKE) data-directory/Makefile
+ cd .. && $(SHELL) ./config.status data-directory/Makefile
+
+# Disable implicit make rules.
+include $(srcdir)/../disable-implicit-rules.mk