Code:
+ tree . /tmp/abc
.
└── makefile
/tmp/abc
├── file1
└── file2
+ cat makefile
define my_function
ls -1 /tmp/abc/$(1) /tmp/abc/$(2)
endef
default:
# SINGLE LINE: OK
$(call my_function,file1,file2)
# MULTI LINE: ERROR
$(call my_function, \
"file1", \
file2 \
)
+ make
# SINGLE LINE: OK
ls -1 /tmp/abc/file1 /tmp/abc/file2
/tmp/abc/file1
/tmp/abc/file2
# MULTI LINE: ERROR
ls -1 /tmp/abc/ "file1" /tmp/abc/ file2
ls: cannot access 'file1': No such file or directory
ls: cannot access 'file2': No such file or directory
/tmp/abc/:
file1
file2
/tmp/abc/:
file1
file2
make: *** [makefile:9: default] Error 2
Synthesis
Code:
# SINGLE LINE: OK
ls -1 /tmp/abc/file1 /tmp/abc/file2
/tmp/abc/file1
/tmp/abc/file2
# MULTI LINE: ERROR
ls -1 /tmp/abc/ "file1" /tmp/abc/ file2
ls: cannot access 'file1': No such file or directory
ls: cannot access 'file2': No such file or directory
Why?

