michael@0: all: michael@0: test "$(subst e,EE,hello)" = "hEEllo" michael@0: test "$(strip $(NULL) test data )" = "test data" michael@0: test "$(findstring hell,hello)" = "hell" michael@0: test "$(findstring heaven,hello)" = "" michael@0: test "$(filter foo/%.c b%,foo/a.c b.c foo/a.o)" = "foo/a.c b.c" michael@0: test "$(filter foo,foo bar)" = "foo" michael@0: test "$(filter-out foo/%.c b%,foo/a.c b.c foo/a.o)" = "foo/a.o" michael@0: test "$(filter-out %.c,foo,bar.c foo,bar.o)" = "foo,bar.o" michael@0: test "$(sort .go a b aa A c cc)" = ".go A a aa b c cc" michael@0: test "$(word 1, hello )" = "hello" michael@0: test "$(word 2, hello )" = "" michael@0: test "$(wordlist 1, 2, foo bar baz )" = "foo bar" michael@0: test "$(words 1 2 3)" = "3" michael@0: test "$(words )" = "0" michael@0: test "$(firstword $(NULL) foo bar baz)" = "foo" michael@0: test "$(firstword )" = "" michael@0: test "$(dir foo.c path/foo.o dir/dir2/)" = "./ path/ dir/dir2/" michael@0: test "$(notdir foo.c path/foo.o dir/dir2/)" = "foo.c foo.o " michael@0: test "$(suffix src/foo.c dir/my.dir/foo foo.o)" = ".c .o" michael@0: test "$(basename src/foo.c dir/my.dir/foo foo.c .c)" = "src/foo dir/my.dir/foo foo " michael@0: test "$(addprefix src/,foo bar.c dir/foo)" = "src/foo src/bar.c src/dir/foo" michael@0: test "$(addsuffix .c,foo dir/bar)" = "foo.c dir/bar.c" michael@0: test "$(join a b c, 1 2 3)" = "a1 b2 c3" michael@0: test "$(join a b, 1 2 3)" = "a1 b2 3" michael@0: test "$(join a b c, 1 2)" = "a1 b2 c" michael@0: test "$(if $(NULL) ,yes)" = "" michael@0: test "$(if 1,yes,no)" = "yes" michael@0: test "$(if ,yes,no )" = "no " michael@0: test "$(if ,$(error Short-circuit problem))" = "" michael@0: test "$(or $(NULL),1)" = "1" michael@0: test "$(or $(NULL),2,$(warning TEST-FAIL bad or short-circuit))" = "2" michael@0: test "$(and ,$(warning TEST-FAIL bad and short-circuit))" = "" michael@0: test "$(and 1,2)" = "2" michael@0: test "$(foreach i,foo bar,found:$(i))" = "found:foo found:bar" michael@0: @echo TEST-PASS