aboutsummaryrefslogtreecommitdiff
path: root/gdb/Makefile.in
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2020-03-12 14:18:21 -0400
committerSimon Marchi <simon.marchi@efficios.com>2020-03-12 14:18:36 -0400
commit74cd3f9d7e2bc82a295011230dc5261cd1129b4f (patch)
tree5dcac5dfb53824783d1ec65828c90e3197c2bbd2 /gdb/Makefile.in
parentdb6878ac5538661c8d66c916a533bd4268217fcb (diff)
downloadgdb-74cd3f9d7e2bc82a295011230dc5261cd1129b4f.zip
gdb-74cd3f9d7e2bc82a295011230dc5261cd1129b4f.tar.gz
gdb-74cd3f9d7e2bc82a295011230dc5261cd1129b4f.tar.bz2
Don't include selftests objects in build when unit tests are disabled
While working on the preceding selftests patches, I noticed that some selftests-specific files are included in the build even when selftests are disabled, namely disasm-selftest.c and gdbarch-selftests.c. These files are entirely #if'ed out when building with selftests disabled. This is not a huge problem, but I think it would make more sense if these files were simply not built. With this patch, I propose to put all the selftests-specific source files into a SELFTESTS_SRCS Makefile variable (even selftest-arch.c, which is currently added by the configure script). gdb/ChangeLog: * Makefile.in (SUBDIR_UNITTESTS_SRCS): Rename to... (SELFTESTS_SRCS): ... this. Add disasm-selftests.c, gdbarch-selfselftests.c and selftest-arch.c. (SUBDIR_UNITTESTS_OBS): Rename to... (SELFTESTS_OBS): ... this. (COMMON_SFILES): Remove disasm-selftests.c and gdbarch-selftests.c. * configure.ac: Don't add selftest-arch.{c,o} to CONFIG_{SRCS,OBS}. * disasm-selftests.c, gdbarch-selftests.c: Remove GDB_SELF_TEST preprocessor conditions.
Diffstat (limited to 'gdb/Makefile.in')
-rw-r--r--gdb/Makefile.in9
1 files changed, 5 insertions, 4 deletions
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 1a837ed..1db02c0 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -420,7 +420,10 @@ SUBDIR_PYTHON_DEPS =
SUBDIR_PYTHON_LDFLAGS =
SUBDIR_PYTHON_CFLAGS =
-SUBDIR_UNITTESTS_SRCS = \
+SELFTESTS_SRCS = \
+ disasm-selftests.c \
+ gdbarch-selftests.c \
+ selftest-arch.c \
unittests/array-view-selftests.c \
unittests/child-path-selftests.c \
unittests/cli-utils-selftests.c \
@@ -454,7 +457,7 @@ SUBDIR_UNITTESTS_SRCS = \
unittests/vec-utils-selftests.c \
unittests/xml-utils-selftests.c
-SUBDIR_UNITTESTS_OBS = $(patsubst %.c,%.o,$(SUBDIR_UNITTESTS_SRCS))
+SELFTESTS_OBS = $(patsubst %.c,%.o,$(SELFTESTS_SRCS))
SUBDIR_TARGET_SRCS = target/waitstatus.c
SUBDIR_TARGET_OBS = $(patsubst %.c,%.o,$(SUBDIR_TARGET_SRCS))
@@ -995,7 +998,6 @@ COMMON_SFILES = \
debuginfod-support.c \
dictionary.c \
disasm.c \
- disasm-selftests.c \
dummy-frame.c \
dwarf2/abbrev.c \
dwarf2/attribute.c \
@@ -1034,7 +1036,6 @@ COMMON_SFILES = \
gdb_obstack.c \
gdb_regex.c \
gdbarch.c \
- gdbarch-selftests.c \
gdbtypes.c \
gnu-v2-abi.c \
gnu-v3-abi.c \