Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Perl Misc (http://www.velocityreviews.com/forums/f67-perl-misc.html)
-   -   Makefile - perl script syntax error (http://www.velocityreviews.com/forums/t893891-makefile-perl-script-syntax-error.html)

NewBie 08-24-2005 09:58 AM

Makefile - perl script syntax error
 
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.



Josef Moellers 08-24-2005 10:54 AM

Re: Makefile - perl script syntax error
 
NewBie wrote:
> 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).

--
Josef Möllers (Pinguinpfleger bei FSC)
If failure had no penalty success would not be a prize
-- T. Pratchett



All times are GMT. The time now is 09:07 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.