Here documents: do they work in FreeBSD make?
Ian Lepore
ian at freebsd.org
Sun Nov 22 03:25:11 UTC 2015
On Sat, 2015-11-21 at 15:15 -0800, Yuri wrote:
> This syntax doesn't work for me:
> @cat <<EOF >${MY_DIR}/my-file \
> #!/bin/sh \
> \
> echo 'Hello World!' \
> EOF \
>
> ${MY_DIR}/my-file is created empty.
>
> Could anybody give me a hint what am I doing wrong?
>
The \ line-splicing is being done by make, the shell sees one long
string which has a comment delim right after the filename and no here
document at all. You should be able to see that if you take the @ off
the line (or make -dl).
-- Ian
More information about the freebsd-hackers
mailing list