From 8727098aa822d2ef12975adebd9a8d5c551fb07c Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Tue, 22 May 2012 09:20:07 +0200 Subject: [PATCH] [ng] cleanup: remove an hack for GNU make 3.80 * lib/am/header-vars.am (am__lastword): Delete: now that we assume GNU make 3.80 we can simply use the '$(lastword)' builtin (which is also faster, for long lists). This also get us rid of an erroneously truncated comment. Signed-off-by: Stefano Lattarini --- lib/am/header-vars.am | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/am/header-vars.am b/lib/am/header-vars.am index 5cd86f6ba..79dde9ca6 100644 --- a/lib/am/header-vars.am +++ b/lib/am/header-vars.am @@ -65,10 +65,6 @@ am__make_dryrun := \ # in some places. am__empty := -# GNU make 3.80 lacks $(lastword). -## FIXME: the best thing to do here is ts -am__lastword = $(word $(words $(1)),$(1)) - am__strip_firstword = $(wordlist 2,$(words $(1)),$(1)) am__strip_lastword = $(wordlist 2,$(words $(1)),dummy $(1)) @@ -82,10 +78,10 @@ am__uniq = $(strip \ $(call am__uniq, \ $(call am__strip_lastword, $(1))) \ ## And append the last element, unless it was already present. - $(if $(filter $(call am__lastword, $(1)), \ + $(if $(filter $(lastword $(1)), \ $(call am__strip_lastword, $(1))), \ $(am__empty), \ - $(call am__lastword,$(1))))) + $(lastword $(1))))) ## Simple memoization for recursive make variables. It is useful for ## situations where immediate variables can't be used (due, say, to -- 2.47.2