From a023966d9a3ad295f0fc986a0e01cabfaf3d6742 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Fri, 13 Sep 2013 03:13:38 +0000 Subject: [PATCH] build: Remove duplicates from $all_objs. In Makefile.in $all_objs is defined as the concatenation of the object lists of all executables. This variable is used to determine the set of dependency files to include. Since the concatenation contains common objects more than once, we currently include common dependencies multiple times. This is not a problem, but it may slow down the build. The make sort function removes duplicate words, so by sorting $all_objs we make sure to include each dependency file only once. --- Makefile.in | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile.in b/Makefile.in index dae49760..df61b2fb 100644 --- a/Makefile.in +++ b/Makefile.in @@ -227,9 +227,10 @@ $(dep_dir)/%.d: %.c | $(dep_dir) $(Q) ./depend.sh $(dep_dir) $(object_dir) $(cmdline_dir) \ $(CPPFLAGS) $< > $@ -all_objs := @recv_objs@ @filter_objs@ @client_objs@ @gui_objs@ \ +# sort removes duplicate words, which is all we need here +all_objs := $(sort @recv_objs@ @filter_objs@ @client_objs@ @gui_objs@ \ @audiod_objs@ @audioc_objs@ @fade_objs@ @server_objs@ \ - @write_objs@ @afh_objs@ @play_objs@ + @write_objs@ @afh_objs@ @play_objs@) deps := $(addprefix $(dep_dir)/, $(all_objs:.o=.d)) m4_deps := $(addprefix $(m4depdir)/, $(addsuffix .m4d, @executables@)) -- 2.39.2