On Thursday 28 June 2007, John Graham-Cumming wrote: > You could always use the function 'uniq' which is in my GMSL. Here's > the definition: > > uniq = $(if $1,$(call uniq,$(call chop,$1)) $(if $(filter $(call > last,$1),$(call chop,$1)),,$(call last,$1)))
The list's Christoph Schulz sent a nice implementation which uses fewer $(call)s: remove-dupes = $(if $1,$(strip $(word 1,$1) $(call $0,$(filter-out $(word 1,$1),$1)))) Pretty elegant, IMO :). (In any case, both yours and Christoph's implementations are far more elegant than mine!) -- ----- stephan beal http://www.wanderinghorse.net
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
