From: Stefano Lattarini Date: Sat, 21 Jul 2012 11:53:50 +0000 (+0200) Subject: [ng] rename: am__strip_lastword -> am.util.strip-last-word X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8a76dc41d8146ef4ef86a2123924ff4f04c0ff91;p=thirdparty%2Fautomake.git [ng] rename: am__strip_lastword -> am.util.strip-last-word Signed-off-by: Stefano Lattarini --- diff --git a/lib/am/header-vars.am b/lib/am/header-vars.am index ef25345f2..af2c6efea 100644 --- a/lib/am/header-vars.am +++ b/lib/am/header-vars.am @@ -149,7 +149,7 @@ am.make.dry-run := \ am.chars.empty := am.util.strip-first-word = $(wordlist 2,$(words $(1)),$(1)) -am__strip_lastword = $(wordlist 2,$(words $(1)),dummy $(1)) +am.util.strip-last-word = $(wordlist 2,$(words $(1)),dummy $(1)) ## Remove repeated elements from the given list (without reordering), ## and return the reduced list. @@ -159,10 +159,10 @@ am__uniq = $(strip \ ## Call the function recursively on the list of all the elements ## but the last one. $(call am__uniq, \ - $(call am__strip_lastword, $(1))) \ + $(call am.util.strip-last-word, $(1))) \ ## And append the last element, unless it was already present. $(if $(filter $(lastword $(1)), \ - $(call am__strip_lastword, $(1))), \ + $(call am.util.strip-last-word, $(1))), \ $(am.chars.empty), \ $(lastword $(1))))) diff --git a/t/internals.tap b/t/internals.tap index 05e85bc6d..650907a95 100755 --- a/t/internals.tap +++ b/t/internals.tap @@ -54,14 +54,14 @@ test-strip-first-word: test '$(call am.util.strip-first-word,1 2 3 4 5 6 7 8)' = '2 3 4 5 6 7 8' test '$(call am.util.strip-first-word, 1 2 )' = '2' -.PHONY: test-strip-lastword -test-strip-lastword: - test '$(call am__strip_lastword,)' = '' - test '$(call am__strip_lastword,1)' = '' - test '$(call am__strip_lastword,1 1)' = '1' - test '$(call am__strip_lastword,1 2)' = '1' - test '$(call am__strip_lastword,1 2 3 4 5 6 7 8)' = '1 2 3 4 5 6 7' - test '$(call am__strip_lastword, 1 2 )' = '1' +.PHONY: test-strip-last-word +test-strip-last-word: + test '$(call am.util.strip-last-word,)' = '' + test '$(call am.util.strip-last-word,1)' = '' + test '$(call am.util.strip-last-word,1 1)' = '1' + test '$(call am.util.strip-last-word,1 2)' = '1' + test '$(call am.util.strip-last-word,1 2 3 4 5 6 7 8)' = '1 2 3 4 5 6 7' + test '$(call am.util.strip-last-word, 1 2 )' = '1' .PHONY: test-uniq test-uniq: @@ -186,7 +186,7 @@ test-newline-3: END command_ok_ am.util.strip-first-word $MAKE test-strip-first-word -command_ok_ am__strip_lastword $MAKE test-strip-lastword +command_ok_ am.util.strip-last-word $MAKE test-strip-last-word command_ok_ am__uniq $MAKE test-uniq command_ok_ am__test_strip_suffixes $MAKE test-strip-suffixes command_ok_ am__tolower $MAKE test-tolower