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.
$(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@))