* [RFA 10/10] Don't mention XM_CDEPS or NAT_CLIBS
2018-07-02 20:19 [RFA 00/10] Minor Makefile cleanups Tom Tromey
` (2 preceding siblings ...)
2018-07-02 20:18 ` [RFA 06/10] Remove lint support Tom Tromey
@ 2018-07-02 20:18 ` Tom Tromey
2018-07-02 20:18 ` [RFA 07/10] Fix exec.c handling in Makefile Tom Tromey
` (6 subsequent siblings)
10 siblings, 0 replies; 14+ messages in thread
From: Tom Tromey @ 2018-07-02 20:18 UTC (permalink / raw)
To: gdb-patches; +Cc: Tom Tromey
Neither XM_CDEPS nor NAT_CLIBS are defined anywhere, so remove the
uses.
2018-07-02 Tom Tromey <tom@tromey.com>
* Makefile.in (CDEPS): Don't mention XM_CDEPS.
(CLIBS): Don't mention NAT_CLIBS.
---
gdb/ChangeLog | 5 +++++
gdb/Makefile.in | 4 ++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index a140fc24a41..9c0dbbfda58 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -596,11 +596,11 @@ INTERNAL_LDFLAGS = \
# XM_CLIBS, defined in *config files, have host-dependent libs.
# LIBIBERTY appears twice on purpose.
CLIBS = $(SIM) $(READLINE) $(OPCODES) $(BFD) $(ZLIB) $(INTL) $(LIBIBERTY) $(LIBDECNUMBER) \
- $(XM_CLIBS) $(NAT_CLIBS) $(GDBTKLIBS) \
+ $(XM_CLIBS) $(GDBTKLIBS) \
@LIBS@ @GUILE_LIBS@ @PYTHON_LIBS@ \
$(LIBEXPAT) $(LIBLZMA) $(LIBBABELTRACE) $(LIBIPT) \
$(LIBIBERTY) $(WIN32LIBS) $(LIBGNU) $(LIBICONV) $(LIBMPFR)
-CDEPS = $(XM_CDEPS) $(NAT_CDEPS) $(SIM) $(BFD) $(READLINE_DEPS) \
+CDEPS = $(NAT_CDEPS) $(SIM) $(BFD) $(READLINE_DEPS) \
$(OPCODES) $(INTL_DEPS) $(LIBIBERTY) $(CONFIG_DEPS) $(LIBGNU)
DIST = gdb
--
2.13.6
^ permalink raw reply [flat|nested] 14+ messages in thread
* [RFA 01/10] Remove TSOBS from gdb/Makefile.in
2018-07-02 20:19 [RFA 00/10] Minor Makefile cleanups Tom Tromey
2018-07-02 20:18 ` [RFA 04/10] Use a stamp file for init.c Tom Tromey
@ 2018-07-02 20:18 ` Tom Tromey
2018-07-02 21:26 ` Simon Marchi
2018-07-02 20:18 ` [RFA 06/10] Remove lint support Tom Tromey
` (8 subsequent siblings)
10 siblings, 1 reply; 14+ messages in thread
From: Tom Tromey @ 2018-07-02 20:18 UTC (permalink / raw)
To: gdb-patches; +Cc: Tom Tromey
The TSOBS variable doesn't seem to serve a useful purpose in
gdb/Makefile.in, so remove it.
gdb/ChangeLog
2018-07-01 Tom Tromey <tom@tromey.com>
* Makefile.in (TSOBS): Remove.
(INIT_FILES): Update.
(LIBGDB_OBS): Update.
(COMMON_SFILES): Add inflow.c.
(SFILES): Remove inflow.c.
---
gdb/ChangeLog | 8 ++++++++
gdb/Makefile.in | 8 +++-----
2 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 13627e07e0a..423b681c905 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -1042,6 +1042,7 @@ COMMON_SFILES = \
infcall.c \
infcmd.c \
inferior.c \
+ inflow.c \
infrun.c \
inline-frame.c \
interps.c \
@@ -1151,7 +1152,6 @@ SFILES = \
f-exp.y \
gdb.c \
go-exp.y \
- inflow.c \
m2-exp.y \
p-exp.y \
proc-service.list \
@@ -1566,8 +1566,6 @@ COMMON_OBS = $(DEPFILES) $(CONFIG_OBS) $(YYOBJ) \
$(SUBDIR_TARGET_OBS) \
$(SUBDIR_GCC_COMPILE_OBS)
-TSOBS = inflow.o
-
SUBDIRS = doc @subdirs@ data-directory $(GNULIB_BUILDDIR)
CLEANDIRS = $(SUBDIRS)
@@ -1854,7 +1852,7 @@ test-cp-name-parser$(EXEEXT): test-cp-name-parser.o $(LIBIBERTY)
# 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) $(TSOBS) $(CONFIG_SRCS) $(SUBDIR_GCC_COMPILE_SRCS)
+INIT_FILES = $(COMMON_OBS) $(CONFIG_SRCS) $(SUBDIR_GCC_COMPILE_SRCS)
init.c: $(INIT_FILES)
@$(ECHO_INIT_C) echo "Making init.c"
@rm -f init.c-tmp init.l-tmp
@@ -1908,7 +1906,7 @@ init.c: $(INIT_FILES)
# against that.
#
# init.o is very important. It pulls in the rest of GDB.
-LIBGDB_OBS = $(COMMON_OBS) $(TSOBS) $(ADD_FILES) init.o
+LIBGDB_OBS = $(COMMON_OBS) $(ADD_FILES) init.o
libgdb.a: $(LIBGDB_OBS)
-rm -f libgdb.a
$(AR) q libgdb.a $(LIBGDB_OBS)
--
2.13.6
^ permalink raw reply [flat|nested] 14+ messages in thread
* [RFA 04/10] Use a stamp file for init.c
2018-07-02 20:19 [RFA 00/10] Minor Makefile cleanups Tom Tromey
@ 2018-07-02 20:18 ` Tom Tromey
2018-07-02 20:18 ` [RFA 01/10] Remove TSOBS from gdb/Makefile.in Tom Tromey
` (9 subsequent siblings)
10 siblings, 0 replies; 14+ messages in thread
From: Tom Tromey @ 2018-07-02 20:18 UTC (permalink / raw)
To: gdb-patches; +Cc: Tom Tromey
This introduces a stamp file for init.c. This prevents constant
rebuilds of init.o, by arranging for init.c to only be modified when
its contents change. (FWIW this is a standard idiom in use by
Automake and by gdb itself for many years.)
2018-07-02 Tom Tromey <tom@tromey.com>
* Makefile.in (init.c): Depend on stamp-init.
(stamp-init): New rule, from init.c rule.
(clean mostlyclean): Remove stamp-init.
---
gdb/ChangeLog | 6 ++++++
gdb/Makefile.in | 9 +++++----
2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index b35ca2e7aef..d14e86727b8 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -1849,7 +1849,8 @@ test-cp-name-parser$(EXEEXT): test-cp-name-parser.o $(LIBIBERTY)
# in sub-directories such as cli/ and mi/.
INIT_FILES = $(COMMON_OBS)
-init.c: $(INIT_FILES)
+init.c: stamp-init; @true
+stamp-init: $(INIT_FILES)
@$(ECHO_INIT_C) echo "Making init.c"
@rm -f init.c-tmp init.l-tmp
@touch init.c-tmp
@@ -1879,8 +1880,8 @@ init.c: $(INIT_FILES)
@echo '{' >>init.c-tmp
@sed -e 's/\(.*\)/ _initialize_\1 ();/' <init.l-tmp >>init.c-tmp
@echo '}' >>init.c-tmp
- @rm init.l-tmp
- @mv init.c-tmp init.c
+ @$(SHELL) $(srcdir)/../move-if-change init.c-tmp init.c
+ @echo stamp > stamp-init
.PRECIOUS: init.c
@@ -1947,7 +1948,7 @@ tags: TAGS
clean mostlyclean: $(CONFIG_CLEAN)
@$(MAKE) $(FLAGS_TO_PASS) DO=clean "DODIRS=$(CLEANDIRS)" subdir_do
rm -f *.o *.a $(ADD_FILES) *~ init.c-tmp init.l-tmp version.c-tmp
- rm -f init.c version.c
+ rm -f init.c stamp-init version.c
rm -f gdb$(EXEEXT) core make.log
rm -f gdb[0-9]$(EXEEXT)
rm -f test-cp-name-parser$(EXEEXT)
--
2.13.6
^ permalink raw reply [flat|nested] 14+ messages in thread
* [RFA 03/10] Simplify INIT_FILES
2018-07-02 20:19 [RFA 00/10] Minor Makefile cleanups Tom Tromey
` (4 preceding siblings ...)
2018-07-02 20:18 ` [RFA 07/10] Fix exec.c handling in Makefile Tom Tromey
@ 2018-07-02 20:18 ` Tom Tromey
2018-07-02 20:18 ` [RFA 05/10] Use a stamp file for version.c Tom Tromey
` (4 subsequent siblings)
10 siblings, 0 replies; 14+ messages in thread
From: Tom Tromey @ 2018-07-02 20:18 UTC (permalink / raw)
To: gdb-patches; +Cc: Tom Tromey
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.
2018-07-01 Tom Tromey <tom@tromey.com>
* Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
SUBDIR_GCC_COMPILE_SRCS.
---
gdb/ChangeLog | 5 +++++
gdb/Makefile.in | 14 ++------------
2 files changed, 7 insertions(+), 12 deletions(-)
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 180f16c7b8d..b35ca2e7aef 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
--
2.13.6
^ permalink raw reply [flat|nested] 14+ messages in thread
* [RFA 05/10] Use a stamp file for version.c
2018-07-02 20:19 [RFA 00/10] Minor Makefile cleanups Tom Tromey
` (5 preceding siblings ...)
2018-07-02 20:18 ` [RFA 03/10] Simplify INIT_FILES Tom Tromey
@ 2018-07-02 20:18 ` Tom Tromey
2018-07-02 20:18 ` [RFA 09/10] Remove ADD_FILES and ADD_DEPS from Makefile.in Tom Tromey
` (3 subsequent siblings)
10 siblings, 0 replies; 14+ messages in thread
From: Tom Tromey @ 2018-07-02 20:18 UTC (permalink / raw)
To: gdb-patches; +Cc: Tom Tromey
This introduces a stamp file for version.c, preventing unnecessary
version.o rebuilds.
2018-07-02 Tom Tromey <tom@tromey.com>
* Makefile.in (clean mostlyclean): Remove stamp-version.
(version.c): Depend on stamp-version.
(stamp-version): New rule, from version.c rule.
---
gdb/ChangeLog | 6 ++++++
gdb/Makefile.in | 12 +++++++++---
2 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index d14e86727b8..fa93ac36c8f 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -1948,7 +1948,7 @@ tags: TAGS
clean mostlyclean: $(CONFIG_CLEAN)
@$(MAKE) $(FLAGS_TO_PASS) DO=clean "DODIRS=$(CLEANDIRS)" subdir_do
rm -f *.o *.a $(ADD_FILES) *~ init.c-tmp init.l-tmp version.c-tmp
- rm -f init.c stamp-init version.c
+ rm -f init.c stamp-init version.c stamp-version
rm -f gdb$(EXEEXT) core make.log
rm -f gdb[0-9]$(EXEEXT)
rm -f test-cp-name-parser$(EXEEXT)
@@ -2138,9 +2138,15 @@ $(srcdir)/copying.c: @MAINTAINER_MODE_TRUE@ $(srcdir)/../COPYING3 $(srcdir)/copy
< $(srcdir)/../COPYING3 > $(srcdir)/copying.tmp
mv $(srcdir)/copying.tmp $(srcdir)/copying.c
-version.c: Makefile version.in $(srcdir)/../bfd/version.h $(srcdir)/common/create-version.sh
+version.c: stamp-version; @true
+# Note that the obvious names for the temp file are taken by
+# create-version.sh.
+stamp-version: Makefile version.in $(srcdir)/../bfd/version.h $(srcdir)/common/create-version.sh
$(ECHO_GEN) $(SHELL) $(srcdir)/common/create-version.sh $(srcdir) \
- $(host_alias) $(target_alias) version.c
+ $(host_alias) $(target_alias) version-t.t
+ @$(SHELL) $(srcdir)/../move-if-change version-t.t version.c
+ @echo stamp > stamp-version
+
lint: $(LINTFILES)
$(LINT) $(INCLUDE_CFLAGS) $(LINTFLAGS) $(LINTFILES) \
--
2.13.6
^ permalink raw reply [flat|nested] 14+ messages in thread
* [RFA 07/10] Fix exec.c handling in Makefile
2018-07-02 20:19 [RFA 00/10] Minor Makefile cleanups Tom Tromey
` (3 preceding siblings ...)
2018-07-02 20:18 ` [RFA 10/10] Don't mention XM_CDEPS or NAT_CLIBS Tom Tromey
@ 2018-07-02 20:18 ` Tom Tromey
2018-07-02 20:18 ` [RFA 03/10] Simplify INIT_FILES Tom Tromey
` (5 subsequent siblings)
10 siblings, 0 replies; 14+ messages in thread
From: Tom Tromey @ 2018-07-02 20:18 UTC (permalink / raw)
To: gdb-patches; +Cc: Tom Tromey
exec.c ws handled specially in COMMON_OBS, but there doesn't seem to
be a reason for this. This changes the Makefile to treat exec.c as an
ordinary source file.
2018-07-02 Tom Tromey <tom@tromey.com>
* Makefile.in (ALLDEPFILES): Remove exec.c.
(COMMON_OBS): Remove exec.o.
(COMMON_SFILES): Add exec.c.
---
gdb/ChangeLog | 6 ++++++
gdb/Makefile.in | 3 +--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index f4286f84143..047d06b6121 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -1006,6 +1006,7 @@ COMMON_SFILES = \
event-loop.c \
event-top.c \
exceptions.c \
+ exec.c \
expprint.c \
extension.c \
f-lang.c \
@@ -1551,7 +1552,6 @@ TAGFILES_NO_SRCDIR = $(SFILES) $(HFILES_NO_SRCDIR) $(ALLDEPFILES) \
TAGFILES_WITH_SRCDIR = $(HFILES_WITH_SRCDIR)
COMMON_OBS = $(DEPFILES) $(CONFIG_OBS) $(YYOBJ) \
- exec.o \
mi/mi-common.o \
version.o \
xml-builtin.o \
@@ -2208,7 +2208,6 @@ ALLDEPFILES = \
bsd-uthread.c \
darwin-nat.c \
dicos-tdep.c \
- exec.c \
fbsd-nat.c \
fbsd-tdep.c \
fork-child.c \
--
2.13.6
^ permalink raw reply [flat|nested] 14+ messages in thread
* [RFA 08/10] Minimize yacc and lex output
2018-07-02 20:19 [RFA 00/10] Minor Makefile cleanups Tom Tromey
` (7 preceding siblings ...)
2018-07-02 20:18 ` [RFA 09/10] Remove ADD_FILES and ADD_DEPS from Makefile.in Tom Tromey
@ 2018-07-02 20:18 ` Tom Tromey
2018-07-02 20:18 ` [RFA 02/10] Remove some unused code from init.c build rule Tom Tromey
2018-07-02 21:47 ` [RFA 00/10] Minor Makefile cleanups Simon Marchi
10 siblings, 0 replies; 14+ messages in thread
From: Tom Tromey @ 2018-07-02 20:18 UTC (permalink / raw)
To: gdb-patches; +Cc: Tom Tromey
This minimizes the "make" output from the yacc and lex rules,
following the same technique as the rest of the Makefile.
The lex rule had a special case to deal with the situation where flex
is not available. I don't think this is needed, so I removed it. If
flex is truly unavailable, the person building gdb can simply "touch"
the output file.
gdb/ChangeLog
2018-07-02 Tom Tromey <tom@tromey.com>
* Makefile.in (%.c: %.y): Use ECHO_YACC.
(%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
* silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
---
gdb/ChangeLog | 6 ++++++
gdb/Makefile.in | 17 +++++------------
gdb/silent-rules.mk | 2 ++
3 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 047d06b6121..36d2c44a2a1 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -2477,9 +2477,9 @@ po/$(PACKAGE).pot: force
# Makefile.in, but that was a pretty big annoyance.
%.c: %.y
- $(SHELL) $(YLWRAP) $< y.tab.c $@.tmp -- $(YACC) $(YFLAGS) \
- || (rm -f $@.tmp; false)
- sed -e '/extern.*malloc/d' \
+ $(ECHO_YACC) $(SHELL) $(YLWRAP) $< y.tab.c $@.tmp -- \
+ $(YACC) $(YFLAGS) || (rm -f $@.tmp; false)
+ @sed -e '/extern.*malloc/d' \
-e '/extern.*realloc/d' \
-e '/extern.*free/d' \
-e '/include.*malloc.h/d' \
@@ -2493,8 +2493,7 @@ po/$(PACKAGE).pot: force
rm -f $@.tmp && \
mv $@.new $@
%.c: %.l
- if [ "$(FLEX)" ] && $(FLEX) --version >/dev/null 2>&1; then \
- $(FLEX) -t $< \
+ $(ECHO_LEX) $(FLEX) -t $< \
| sed -e '/extern.*malloc/d' \
-e '/extern.*realloc/d' \
-e '/extern.*free/d' \
@@ -2505,13 +2504,7 @@ po/$(PACKAGE).pot: force
-e 's/\([ \t;,(]\)free$$/\1xfree/g' \
-e 's/yy_flex_xrealloc/yyxrealloc/g' \
> $@.new && \
- mv $@.new $@; \
- elif [ -f $@ ]; then \
- echo "Warning: $*.c older than $*.l and flex not available."; \
- else \
- echo "$@ missing and flex not available."; \
- false; \
- fi
+ mv $@.new $@
.PRECIOUS: ada-lex.c
diff --git a/gdb/silent-rules.mk b/gdb/silent-rules.mk
index ade77ad1c51..7ed73a767c6 100644
--- a/gdb/silent-rules.mk
+++ b/gdb/silent-rules.mk
@@ -11,5 +11,7 @@ ECHO_GEN_XML_BUILTIN_GENERATED = \
@echo " GEN xml-builtin-generated.c";
ECHO_INIT_C = echo " GEN init.c" ||
ECHO_SIGN = @echo " SIGN gdb";
+ECHO_YACC = @echo " YACC $@";
+ECHO_LEX = @echo " LEX $@";
SILENCE = @
endif
--
2.13.6
^ permalink raw reply [flat|nested] 14+ messages in thread
* [RFA 09/10] Remove ADD_FILES and ADD_DEPS from Makefile.in
2018-07-02 20:19 [RFA 00/10] Minor Makefile cleanups Tom Tromey
` (6 preceding siblings ...)
2018-07-02 20:18 ` [RFA 05/10] Use a stamp file for version.c Tom Tromey
@ 2018-07-02 20:18 ` Tom Tromey
2018-07-02 20:18 ` [RFA 08/10] Minimize yacc and lex output Tom Tromey
` (2 subsequent siblings)
10 siblings, 0 replies; 14+ messages in thread
From: Tom Tromey @ 2018-07-02 20:18 UTC (permalink / raw)
To: gdb-patches; +Cc: Tom Tromey
Nothing defines XM_ADD_FILES, TM_ADD_FILES, or NAT_ADD_FILES any more,
so consequently ADD_FILES and ADD_DEPS are no longer needed. So, this
removes them.
gdb/ChangeLog
2018-07-02 Tom Tromey <tom@tromey.com>
* Makefile.in (ADD_FILES, ADD_DEPS): Remove.
(LIBGDB_OBS, clean mostlyclean): Update.
(gdb$(EXEEXT), insight$(EXEEXT)): Update.
---
gdb/ChangeLog | 6 ++++++
gdb/Makefile.in | 12 ++++--------
2 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 36d2c44a2a1..a140fc24a41 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -603,9 +603,6 @@ CLIBS = $(SIM) $(READLINE) $(OPCODES) $(BFD) $(ZLIB) $(INTL) $(LIBIBERTY) $(LIBD
CDEPS = $(XM_CDEPS) $(NAT_CDEPS) $(SIM) $(BFD) $(READLINE_DEPS) \
$(OPCODES) $(INTL_DEPS) $(LIBIBERTY) $(CONFIG_DEPS) $(LIBGNU)
-ADD_FILES = $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
-ADD_DEPS = $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
-
DIST = gdb
RUNTEST = runtest
@@ -1882,14 +1879,14 @@ stamp-init: $(INIT_FILES)
# against that.
#
# init.o is very important. It pulls in the rest of GDB.
-LIBGDB_OBS = $(COMMON_OBS) $(ADD_FILES) init.o
+LIBGDB_OBS = $(COMMON_OBS) init.o
libgdb.a: $(LIBGDB_OBS)
-rm -f libgdb.a
$(AR) q libgdb.a $(LIBGDB_OBS)
$(RANLIB) libgdb.a
# Removing the old gdb first works better if it is running, at least on SunOS.
-gdb$(EXEEXT): gdb.o $(LIBGDB_OBS) $(ADD_DEPS) $(CDEPS) $(TDEPLIBS)
+gdb$(EXEEXT): gdb.o $(LIBGDB_OBS) $(CDEPS) $(TDEPLIBS)
$(SILENCE) rm -f gdb$(EXEEXT)
$(ECHO_CXXLD) $(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) \
-o gdb$(EXEEXT) gdb.o $(LIBGDB_OBS) \
@@ -1940,7 +1937,7 @@ tags: TAGS
clean mostlyclean: $(CONFIG_CLEAN)
@$(MAKE) $(FLAGS_TO_PASS) DO=clean "DODIRS=$(CLEANDIRS)" subdir_do
- rm -f *.o *.a $(ADD_FILES) *~ init.c-tmp init.l-tmp version.c-tmp
+ rm -f *.o *.a *~ init.c-tmp init.l-tmp version.c-tmp
rm -f init.c stamp-init version.c stamp-version
rm -f gdb$(EXEEXT) core make.log
rm -f gdb[0-9]$(EXEEXT)
@@ -2572,8 +2569,7 @@ clean-gdbtk:
rm -f insight$(EXEEXT)
# Removing the old gdb first works better if it is running, at least on SunOS.
-insight$(EXEEXT): gdbtk-main.o libgdb.a $(ADD_DEPS) \
- $(CDEPS) $(TDEPLIBS)
+insight$(EXEEXT): gdbtk-main.o libgdb.a $(CDEPS) $(TDEPLIBS)
rm -f insight$(EXEEXT)
$(ECHO_CXXLD) $(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) \
-o insight$(EXEEXT) gdbtk-main.o libgdb.a \
--
2.13.6
^ permalink raw reply [flat|nested] 14+ messages in thread
* [RFA 02/10] Remove some unused code from init.c build rule
2018-07-02 20:19 [RFA 00/10] Minor Makefile cleanups Tom Tromey
` (8 preceding siblings ...)
2018-07-02 20:18 ` [RFA 08/10] Minimize yacc and lex output Tom Tromey
@ 2018-07-02 20:18 ` Tom Tromey
2018-07-02 21:47 ` [RFA 00/10] Minor Makefile cleanups Simon Marchi
10 siblings, 0 replies; 14+ messages in thread
From: Tom Tromey @ 2018-07-02 20:18 UTC (permalink / raw)
To: gdb-patches; +Cc: Tom Tromey
The init.c build rule has a few sed expressions that aren't necessary
any more. This removes them.
gdb/ChangeLog
2018-07-01 Tom Tromey <tom@tromey.com>
* Makefile.in (init.c): Remove some unused sed rules.
---
gdb/ChangeLog | 4 ++++
gdb/Makefile.in | 8 --------
2 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 423b681c905..180f16c7b8d 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -1865,18 +1865,10 @@ init.c: $(INIT_FILES)
sed \
-e '/^gdbtypes.[co]$$/d' \
-e '/^init.[co]$$/d' \
- -e '/xdr_ld.[co]$$/d' \
- -e '/xdr_ptrace.[co]$$/d' \
- -e '/xdr_rdb.[co]$$/d' \
- -e '/udr.[co]$$/d' \
- -e '/udip2soc.[co]$$/d' \
- -e '/udi2go32.[co]$$/d' \
-e '/version.[co]$$/d' \
-e '/^[a-z0-9A-Z_]*_[SU].[co]$$/d' \
- -e '/[a-z0-9A-Z_]*-exp.tab.[co]$$/d' \
-e 's/-exp\.o$$/-exp.y/' \
-e 's/\.[co]$$/.c/' \
- -e 's,signals\.c,common/signals\.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; \
--
2.13.6
^ permalink raw reply [flat|nested] 14+ messages in thread
* [RFA 06/10] Remove lint support
2018-07-02 20:19 [RFA 00/10] Minor Makefile cleanups Tom Tromey
2018-07-02 20:18 ` [RFA 04/10] Use a stamp file for init.c Tom Tromey
2018-07-02 20:18 ` [RFA 01/10] Remove TSOBS from gdb/Makefile.in Tom Tromey
@ 2018-07-02 20:18 ` Tom Tromey
2018-07-02 20:18 ` [RFA 10/10] Don't mention XM_CDEPS or NAT_CLIBS Tom Tromey
` (7 subsequent siblings)
10 siblings, 0 replies; 14+ messages in thread
From: Tom Tromey @ 2018-07-02 20:18 UTC (permalink / raw)
To: gdb-patches; +Cc: Tom Tromey
I don't think anyone uses lint any more, so this removes the support
for it from the Makefile.
2018-07-02 Tom Tromey <tom@tromey.com>
* Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
---
gdb/ChangeLog | 4 ++++
gdb/Makefile.in | 11 -----------
2 files changed, 4 insertions(+), 11 deletions(-)
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index fa93ac36c8f..f4286f84143 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -608,11 +608,6 @@ ADD_DEPS = $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
DIST = gdb
-LINT = /usr/5bin/lint
-LINTFLAGS = $(GDB_CFLAGS) $(OPCODES_CFLAGS) $(READLINE_CFLAGS) \
- $(BFD_CFLAGS) $(INCLUDE_CFLAGS) \
- $(INTL_CFLAGS)
-
RUNTEST = runtest
RUNTESTFLAGS =
@@ -1168,8 +1163,6 @@ SFILES = \
$(COMMON_SFILES) \
$(SUBDIR_GCC_COMPILE_SRCS)
-LINTFILES = $(SFILES) $(YYFILES) $(CONFIG_SRCS) init.c
-
# Header files that need to have srcdir added. Note that in the cases
# where we use a macro like $(gdbcmd_h), things are carefully arranged
# so that each .h file is listed exactly once (M-x tags-search works
@@ -2148,10 +2141,6 @@ stamp-version: Makefile version.in $(srcdir)/../bfd/version.h $(srcdir)/common/c
@echo stamp > stamp-version
-lint: $(LINTFILES)
- $(LINT) $(INCLUDE_CFLAGS) $(LINTFLAGS) $(LINTFILES) \
- `echo $(DEPFILES) $(CONFIG_OBS) | sed 's/\.o /\.c /g'`
-
gdb.cxref: $(SFILES)
cxref -I. $(SFILES) >gdb.cxref
--
2.13.6
^ permalink raw reply [flat|nested] 14+ messages in thread
* [RFA 00/10] Minor Makefile cleanups
@ 2018-07-02 20:19 Tom Tromey
2018-07-02 20:18 ` [RFA 04/10] Use a stamp file for init.c Tom Tromey
` (10 more replies)
0 siblings, 11 replies; 14+ messages in thread
From: Tom Tromey @ 2018-07-02 20:19 UTC (permalink / raw)
To: gdb-patches
I accidentally sent this to the binutils list the first time around,
oops.
This series holds a number of small cleanups to gdb/Makefile. Each
patch should be reasonably self-explanatory. Several are probably
obvious.
Tested by the buildbot.
Tom
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [RFA 01/10] Remove TSOBS from gdb/Makefile.in
2018-07-02 20:18 ` [RFA 01/10] Remove TSOBS from gdb/Makefile.in Tom Tromey
@ 2018-07-02 21:26 ` Simon Marchi
2018-07-02 22:04 ` Tom Tromey
0 siblings, 1 reply; 14+ messages in thread
From: Simon Marchi @ 2018-07-02 21:26 UTC (permalink / raw)
To: Tom Tromey, gdb-patches
On 2018-07-02 04:18 PM, Tom Tromey wrote:
> The TSOBS variable doesn't seem to serve a useful purpose in
> gdb/Makefile.in, so remove it.
Do you have a clue why inflow.c was treated specially? If there's
no real reason, then this patch LGTM.
Simon
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [RFA 00/10] Minor Makefile cleanups
2018-07-02 20:19 [RFA 00/10] Minor Makefile cleanups Tom Tromey
` (9 preceding siblings ...)
2018-07-02 20:18 ` [RFA 02/10] Remove some unused code from init.c build rule Tom Tromey
@ 2018-07-02 21:47 ` Simon Marchi
10 siblings, 0 replies; 14+ messages in thread
From: Simon Marchi @ 2018-07-02 21:47 UTC (permalink / raw)
To: Tom Tromey, gdb-patches
On 2018-07-02 04:18 PM, Tom Tromey wrote:
> I accidentally sent this to the binutils list the first time around,
> oops.
>
> This series holds a number of small cleanups to gdb/Makefile. Each
> patch should be reasonably self-explanatory. Several are probably
> obvious.
>
> Tested by the buildbot.
>
> Tom
Hi Tom,
Thanks for doing this, it all looks good to me. Maybe wait a few days
to see if anybody else with more background as to why things are the
way they are has something to say.
Simon
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [RFA 01/10] Remove TSOBS from gdb/Makefile.in
2018-07-02 21:26 ` Simon Marchi
@ 2018-07-02 22:04 ` Tom Tromey
0 siblings, 0 replies; 14+ messages in thread
From: Tom Tromey @ 2018-07-02 22:04 UTC (permalink / raw)
To: Simon Marchi; +Cc: Tom Tromey, gdb-patches
>>>>> "Simon" == Simon Marchi <simark@simark.ca> writes:
Simon> On 2018-07-02 04:18 PM, Tom Tromey wrote:
>> The TSOBS variable doesn't seem to serve a useful purpose in
>> gdb/Makefile.in, so remove it.
Simon> Do you have a clue why inflow.c was treated specially? If there's
Simon> no real reason, then this patch LGTM.
I have no idea, and git annotate just says that this dates back to the
creation of the sourceware repository.
Tom
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2018-07-02 22:04 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-02 20:19 [RFA 00/10] Minor Makefile cleanups Tom Tromey
2018-07-02 20:18 ` [RFA 04/10] Use a stamp file for init.c Tom Tromey
2018-07-02 20:18 ` [RFA 01/10] Remove TSOBS from gdb/Makefile.in Tom Tromey
2018-07-02 21:26 ` Simon Marchi
2018-07-02 22:04 ` Tom Tromey
2018-07-02 20:18 ` [RFA 06/10] Remove lint support Tom Tromey
2018-07-02 20:18 ` [RFA 10/10] Don't mention XM_CDEPS or NAT_CLIBS Tom Tromey
2018-07-02 20:18 ` [RFA 07/10] Fix exec.c handling in Makefile Tom Tromey
2018-07-02 20:18 ` [RFA 03/10] Simplify INIT_FILES Tom Tromey
2018-07-02 20:18 ` [RFA 05/10] Use a stamp file for version.c Tom Tromey
2018-07-02 20:18 ` [RFA 09/10] Remove ADD_FILES and ADD_DEPS from Makefile.in Tom Tromey
2018-07-02 20:18 ` [RFA 08/10] Minimize yacc and lex output Tom Tromey
2018-07-02 20:18 ` [RFA 02/10] Remove some unused code from init.c build rule Tom Tromey
2018-07-02 21:47 ` [RFA 00/10] Minor Makefile cleanups Simon Marchi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).