3 # 01.06.2005 Volker Quetschke
4 # Tests for dmake function macros - part 2.
5 # (issue 36027, issue 37053, issue 37491)
11 trap '{ echo "trapped signal - removing temporary files" ; rm -rf $tmpfiles ; }' 1 2 3 15
13 trap 'rm -rf $tmpfiles' 1 2 3 15
15 # Remember to quote variables in generated makefiles( $ -> \$ ).
17 # Testing function macros
25 +@echo -e '\n\$\$(shell ...) section'
26 +test ":123:" = ":\$(shell echo 123 ):"
27 +test ":123:" = ":\$(shell \
29 +test ":123:" = ":\$(shell echo \
32 +@echo -e '\n\$\$(sort ...) section'
33 +test ":a b c:" = ":\$(sort c a b ):"
34 +test ":a b c:" = ":\$(sort\
36 +test ":a b c:" = ":\$(sort c \
39 +@echo -e '\n\$\$(strip ...) section'
40 +test ":c a b:" = ":\$(strip c a b ):"
41 +test ":c a b:" = ":\$(strip c \
44 +@echo -e '\n\$\$(subst ...) section'
45 +test ":aZbZc:" = ":\$(subst,\$(SPACECHAR),\$(PAT) \$(TEST1)):"
46 +test ":aZbZc:" = ":\$(subst,%Z*Z%,\$(PAT) \$(TEST1:s/ /%Z*Z%/)):"
47 +test ":aZbZc:" = ":\$(subst,Y,\$(PAT) aYbYc ):"
48 +test ":aZbZc:" = ":{\$(subst,Y,Z aYbYc )}:"
50 # +test ":Should error out:BUG:\$(subst, ,\$(PAT) \$(TEST1)):"
52 +@echo -e '\n\$\$(uniq ...) section'
53 +test ":a b c:" = ":\$(uniq c a b c ):"
54 +test ":a b c:" = ":\$(uniq c \
59 ${DMAKEPROG} -r -f $file1
62 test $result -eq 0 && echo "Success - Cleaning up" && rm -f ${tmpfiles}
63 test $result -ne 0 && echo "Failure!"