GDB_WARN_CFLAGS = $(WARN_CFLAGS)
GDB_WERROR_CFLAGS = $(WERROR_CFLAGS)
-GDB_WARN_CFLAGS_NO_FORMAT = `echo " $(GDB_WARN_CFLAGS) " | sed "s/ -Wformat-nonliteral / /g"`
+GDB_WARN_CFLAGS_NO_FORMAT = `echo " $(GDB_WARN_CFLAGS) " \
+ | sed "s/ -Wformat-nonliteral / -Wno-format-nonliteral /g"`
RDYNAMIC = @RDYNAMIC@
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 xml-syscall.h ada-operator.inc microblaze-tdep.h \
-psymtab.h psympriv.h
+psymtab.h psympriv.h progspace.h
# Header files that already have srcdir in them, or which are in objdir.
inferior.o osdata.o gdb_usleep.o record.o gcore.o \
jit.o progspace.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 \
- sparc-linux.xml sparc64-linux.xml
-
TSOBS = inflow.o
-SUBDIRS = @subdirs@
+SUBDIRS = @subdirs@ data-directory
CLEANDIRS = $(SUBDIRS) gnulib
# For now, shortcut the "configure GDB for fewer languages" stuff.
$(COMPILE) $<
$(POSTCOMPILE)
-all: gdb$(EXEEXT) $(CONFIG_ALL) xml-syscall-copy
+all: gdb$(EXEEXT) $(CONFIG_ALL)
@$(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
# install-only is intended to address that need.
install: all install-only
-# The "install-only" target also installs the syscalls' XML files in
-# the system.
-install-only: $(CONFIG_INSTALL) xml-syscall-install
+install-only: $(CONFIG_INSTALL)
transformed_name=`t='$(program_transform_name)'; \
echo gdb | sed -e "$$t"` ; \
if test "x$$transformed_name" = x; then \
@$(MAKE) $(FLAGS_TO_PASS) DO=all DODIRS=gnulib subdir_do
.PHONY: all-lib
+# Convenience rule to handle recursion.
+.PHONY: all-data-directory
+all-data-directory: data-directory/Makefile
+ @$(MAKE) $(FLAGS_TO_PASS) DO=all DODIRS=data-directory subdir_do
+
# Create a library of the gdb object files and build GDB by linking
# against that.
#
CONFIG_LINKS= \
$(SHELL) config.status
+data-directory/Makefile: data-directory/Makefile.in config.status @frags@
+ CONFIG_FILES="data-directory/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 \
# definitly will not work. "monitor.c" needs to be rewritten so that
# it doesn't use format strings and instead uses callbacks.
monitor.o: $(srcdir)/monitor.c
- $(COMPILE.pre) $(INTERNAL_WARN_CFLAGS) $(COMPILE.post) $(srcdir)/monitor.c
+ $(COMPILE.pre) $(INTERNAL_CFLAGS) $(GDB_WARN_CFLAGS_NO_FORMAT) \
+ $(COMPILE.post) $(srcdir)/monitor.c
$(POSTCOMPILE)
# Do not try to build "printcmd.c" with -Wformat-nonliteral. It manually
# checks format strings.
printcmd.o: $(srcdir)/printcmd.c
- $(COMPILE.pre) $(INTERNAL_CFLAGS_BASE) $(GDB_WARN_CFLAGS_NO_FORMAT) \
- $(GDB_WERROR_CFLAGS) $(COMPILE.post) $(srcdir)/printcmd.c
+ $(COMPILE.pre) $(INTERNAL_CFLAGS) $(GDB_WARN_CFLAGS_NO_FORMAT) \
+ $(COMPILE.post) $(srcdir)/printcmd.c
$(POSTCOMPILE)
# Message files. Based on code in gcc/Makefile.in.