At 05:32 PM 9/10/2006, Philip Guenther wrote:
On 9/10/06, Louis-David Mitterrand <[EMAIL PROTECTED]> wrote:
I'm trying to get this rule to work:

        id3tag:
echo mp3/blues/john_lee_hooker/boom_boom/ | IFS=/ read form genre artist album && echo "$$form $$genre $$artist $$album"

but it echoes nothing.

Normally, the various commands in a pipeline are all executed in
separate processes.  Some shells will handle the last command of the
pipeline in the original process if it's a 'read', but last I checked
that was not required by the POSIX standard.

So, it appears that the shell used by make by default (/bin/sh)
doesn't do that special handling.  There are a number of workaround,
the simplest being to make the 'last command of the pipeline' contain
not just the 'read' but also the commands that need the variable
values.

I'd say the simplest workaround is to add "SHELL := /bin/zsh" to the makefile.

-David Boyce




_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to