automake-ng
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Automake-NG] [FYI] [ng] cleanup: remove an hack for GNU make 3.80


From: Stefano Lattarini
Subject: [Automake-NG] [FYI] [ng] cleanup: remove an hack for GNU make 3.80
Date: Tue, 22 May 2012 11:09:42 +0200

* 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 <address@hidden>
---
 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 5cd86f6..79dde9c 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
-- 
1.7.9.5




reply via email to

[Prev in Thread] Current Thread [Next in Thread]