We would add a target to link a C file into datapath directories each
time that file was mentioned in a list of sources, so when we put a source
file into two different lists of sources it got two such targets. Fixed
by using the GNU make $(sort) function to eliminate duplicates.
default: $(all_links)
-$(foreach m,$(all_modules), \
- $(foreach s,$($(m)_sources), \
- $(eval $(notdir $(s)): ; ln -s $(srcdir)/../$(s) $@)))
+$(foreach s,$(sort $(foreach m,$(all_modules),$($(m)_sources))), \
+ $(eval $(notdir $(s)): ; ln -s $(srcdir)/../$(s) $@))
distclean: clean
rm -f kcompat.h