From 7de770fa97df21c7eff7ea3ed3f9d88541129b2a Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Tue, 30 Dec 2008 11:40:22 -0800 Subject: [PATCH] Fix GNU make warning about overriding commands for a target. 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. --- datapath/linux-2.6/Makefile.main.in | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/datapath/linux-2.6/Makefile.main.in b/datapath/linux-2.6/Makefile.main.in index 7847c835..aef3e3d0 100644 --- a/datapath/linux-2.6/Makefile.main.in +++ b/datapath/linux-2.6/Makefile.main.in @@ -11,9 +11,8 @@ include @HW_TABLES@ 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 -- 2.30.2