From: Ben Pfaff Date: Tue, 30 Dec 2008 19:40:22 +0000 (-0800) Subject: Fix GNU make warning about overriding commands for a target. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7de770fa97df21c7eff7ea3ed3f9d88541129b2a;p=openvswitch 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. --- 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