Makefile - perl script syntax error

Discussion in 'Perl Misc' started by NewBie, Aug 24, 2005.

  1. NewBie

    NewBie Guest

    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.
     
    NewBie, Aug 24, 2005
    #1
    1. Advertisements

  2. 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
     
    Josef Moellers, Aug 24, 2005
    #2
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Wet Basement
    Replies:
    1
    Views:
    2,817
    BobMonk
    Jul 15, 2003
  2. dpackwood
    Replies:
    3
    Views:
    2,168
  3. pj
    Replies:
    3
    Views:
    458
  4. Petterson Mikael

    Execute another perl script from my perl script

    Petterson Mikael, Jan 5, 2005, in forum: Perl Misc
    Replies:
    3
    Views:
    283
    Paul Lalli
    Jan 5, 2005
  5. Replies:
    20
    Views:
    1,322
    Gunnar Hjalmarsson
    Jan 18, 2005
  6. Replies:
    6
    Views:
    274
    Tad McClellan
    Apr 14, 2005
  7. vikrant
    Replies:
    4
    Views:
    453
  8. Mark Richards
    Replies:
    3
    Views:
    484
    Tad McClellan
    Nov 18, 2007
Loading...