aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2018-07-01 18:31:08 -0600
committerTom Tromey <tom@tromey.com>2018-07-09 08:03:49 -0600
commit4c7549492b301d7d118379c3e98afc0b364d1935 (patch)
tree522f64fe59a0b8ac35d97676f52313239b41872d /gdb
parent6497f1dd035530c483fdae22aaa6fcc715775f58 (diff)
downloadgdb-4c7549492b301d7d118379c3e98afc0b364d1935.zip
gdb-4c7549492b301d7d118379c3e98afc0b364d1935.tar.gz
gdb-4c7549492b301d7d118379c3e98afc0b364d1935.tar.bz2
Simplify INIT_FILES
This simplifies the INIT_FILES variable. COMMON_OBS includes CONFIG_OBS and SUBDIR_GCC_COMPILE_OBS, so there's no need to reference CONFIG_OBS or SUBDIR_GCC_COMPILE_SRCS there. Once this is done, it it clear that duplicates can't occur, so remove the duplicate-removing code as well. gdb/ChangeLog 2018-07-09 Tom Tromey <tom@tromey.com> * Makefile.in (INIT_FILES): Remove CONFIG_SRCS, SUBDIR_GCC_COMPILE_SRCS.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/Makefile.in14
2 files changed, 7 insertions, 12 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 24bc1f9..93f972b3 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2018-07-09 Tom Tromey <tom@tromey.com>
+ * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
+ SUBDIR_GCC_COMPILE_SRCS.
+
+2018-07-09 Tom Tromey <tom@tromey.com>
+
* Makefile.in (init.c): Remove some unused sed rules.
2018-07-09 Tom Tromey <tom@tromey.com>
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 180f16c..b35ca2e 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -1848,11 +1848,7 @@ test-cp-name-parser$(EXEEXT): test-cp-name-parser.o $(LIBIBERTY)
# automatically adds the $(srcdir) prefixes when it encounters files
# in sub-directories such as cli/ and mi/.
-# NOTE: cagney/2004-02-08: The ``case "$$fs" in'' eliminates
-# duplicates. Files in the gdb/ directory can end up appearing in
-# COMMON_OBS (as a .o file) and CONFIG_SRCS (as a .c file).
-
-INIT_FILES = $(COMMON_OBS) $(CONFIG_SRCS) $(SUBDIR_GCC_COMPILE_SRCS)
+INIT_FILES = $(COMMON_OBS)
init.c: $(INIT_FILES)
@$(ECHO_INIT_C) echo "Making init.c"
@rm -f init.c-tmp init.l-tmp
@@ -1868,16 +1864,10 @@ init.c: $(INIT_FILES)
-e '/version.[co]$$/d' \
-e '/^[a-z0-9A-Z_]*_[SU].[co]$$/d' \
-e 's/-exp\.o$$/-exp.y/' \
- -e 's/\.[co]$$/.c/' \
+ -e 's/\.o$$/.c/' \
-e 's|^\([^ /][^ ]*\)|$(srcdir)/\1|g' | \
while read f; do \
sed -n -e 's/^_initialize_\([a-z_0-9A-Z]*\).*/\1/p' $$f 2>/dev/null; \
- done | \
- while read f; do \
- case " $$fs " in \
- *" $$f "* ) ;; \
- * ) echo $$f ; fs="$$fs $$f";; \
- esac; \
done >> init.l-tmp
@echo '/* Do not modify this file. */' >>init.c-tmp
@echo '/* It is created automatically by the Makefile. */'>>init.c-tmp