Makefile - perl script syntax error

N

NewBie

Hi,

Appreciate any pointer why there is a compliant:

The perl script (partial):
:
orca_logo.gif.hex: orca_logo.gif
perl -e 'while (sysread(STDIN, $$b, 35)){print unpack("h*",
$$b),"\n"}' < $< > $@
:

The complaint:
:
make CFLAGS=-g -O2 || exit 1
perl -e 'while (sysread(STDIN, $b, 35)){print unpack("h*",
$b),"\n"}' < > orca_logo.gif.hex
sh: Syntax error at line 1 : `>' is not expected.
:

Thanks in advance.
 
J

Josef Moellers

NewBie said:
Hi,

Appreciate any pointer why there is a compliant:

The perl script (partial):

This is not a part of a perl script, it is part of your makefile:
:
orca_logo.gif.hex: orca_logo.gif
perl -e 'while (sysread(STDIN, $$b, 35)){print unpack("h*",
$$b),"\n"}' < $< > $@
:

The complaint:
:
make CFLAGS=-g -O2 || exit 1
perl -e 'while (sysread(STDIN, $b, 35)){print unpack("h*",
$b),"\n"}' < > orca_logo.gif.hex
sh: Syntax error at line 1 : `>' is not expected.
:

And your Perl question is?

You seem to have problems with your makefile, not with your perl
one-liner. (Strange thing is that it works for me.) Apparently your make
doesn't recognize the "$<", but again, you don't have a Perl problem (yet).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top