[4/7] gdb, gdbserver: always use order-only prerequisites for generated files
Checks
Commit Message
Both gdb/Makefile.in and gdbserver/Makefile.in guard their use of
order-only prerequisites behind a check for the .VARIABLES variable,
falling back to a normal prerequisite when it is not defined:
# Ensure that generated files are created early. Use order-only
# dependencies if available. They require GNU make 3.80 or newer,
# and the .VARIABLES variable was introduced at the same time.
ifdef .VARIABLES
$(all_object_files): | $(generated_files)
else
$(all_object_files) : $(generated_files)
endif
Building GDB requires GNU make >= 3.82, as documented in gdb/NEWS and
(as of the previous patch) in gdb/README. On top of that,
gdb/Makefile.in already uses an order-only prerequisite unconditionally,
in the rule for compiling .c files in the top-level gdb directory:
%.o: %.c | $(CONFIG_DEP_SUBDIR)
Remove the conditional and trim the comment accordingly.
Change-Id: Ic5cca15f21dc1a4908f978c788f416780ea1b5cd
---
gdb/Makefile.in | 8 +-------
gdbserver/Makefile.in | 8 +-------
2 files changed, 2 insertions(+), 14 deletions(-)
Comments
>>>>> "Simon" == Simon Marchi <simon.marchi@efficios.com> writes:
Simon> Both gdb/Makefile.in and gdbserver/Makefile.in guard their use of
Simon> order-only prerequisites behind a check for the .VARIABLES variable,
Simon> falling back to a normal prerequisite when it is not defined:
...
Simon> Remove the conditional and trim the comment accordingly.
Ok, thanks.
Approved-By: Tom Tromey <tom@tromey.com>
Tom
@@ -2837,14 +2837,8 @@ all_object_files = gdb.o $(LIBGDB_OBS) gdbtk/generic/gdbtk-main.o
all_deps_files = $(foreach dep,$(patsubst %.o,%.Po,$(all_object_files)),\
$(dir $(dep))/$(DEPDIR)/$(notdir $(dep)))
-# Ensure that generated files are created early. Use order-only
-# dependencies if available. They require GNU make 3.80 or newer,
-# and the .VARIABLES variable was introduced at the same time.
-ifdef .VARIABLES
+# Ensure that generated files are created early.
$(all_object_files): | $(generated_files)
-else
-$(all_object_files) : $(generated_files)
-endif
# Dependencies.
-include $(all_deps_files)
@@ -602,14 +602,8 @@ gdbreplay.o: gdbreplay.cc
# dependency tracking.
all_object_files = $(OBS) $(GDBREPLAY_OBS) $(IPA_OBJS)
-# Ensure that generated files are created early. Use order-only
-# dependencies if available. They require GNU make 3.80 or newer,
-# and the .VARIABLES variable was introduced at the same time.
-ifdef .VARIABLES
+# Ensure that generated files are created early.
$(all_object_files): | $(generated_files)
-else
-$(all_object_files) : $(generated_files)
-endif
# All the .deps files to include.
all_deps_files = $(foreach dep,$(patsubst %.o,%.Po,$(all_object_files)),\