]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
[ng] cleanup: remove an hack for GNU make 3.80
authorStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 22 May 2012 07:20:07 +0000 (09:20 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 22 May 2012 09:11:49 +0000 (11:11 +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 <stefano.lattarini@gmail.com>
lib/am/header-vars.am

index 5cd86f6ba029a8edb1d579c0da8b91f27647bc1f..79dde9ca62e341e1d51363ff6096cadcaf4965fe 100644 (file)
@@ -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