Help calling perl from gnu make on windows

Discussion in 'Perl Misc' started by Random Task, Mar 29, 2006.

  1. Random Task

    Random Task Guest

    Hi ...

    I think this will take someone here 5 minutes to provide me guidance.

    I am calling perl from gnu make on windows and I am having a problem
    with "arguments with spaces".

    My build rule looks like this:

    CommonComponentImplementation1/CommonComponentImplementation1_Build :
    echo "hey"
    $(CE_PERL) C:/Program Files/jim.pl

    My error message looks like this:

    "hey"
    "C:\Program Files\Zeligsoft\Component Enabler\\perl\bin\perl.exe"
    C:/Program\ Files/jim.pl
    Can't open perl script "C:/Program\": No such file or directory
    make: ***
    [CommonComponentImplementation1/CommonComponentImplementation1_Build]
    Error 0x2
    Random Task, Mar 29, 2006
    #1
    1. Advertising

  2. Random Task

    Dr.Ruud Guest

    Random Task schreef:

    > I am calling perl from gnu make on windows and I am having a problem
    > with "arguments with spaces".


    Did you try to put "" around them?

    --
    Affijn, Ruud

    "Gewoon is een tijger."
    echo 014C8A26C5DB87DBE85A93DBF |perl -pe 'tr/0-9A-F/JunkshoP cartel,/'
    Dr.Ruud, Mar 29, 2006
    #2
    1. Advertising

  3. Random Task

    Random Task Guest

    Unfortunately yes ...

    I have tried

    <"some exec filename with space"> -help

    which executes fine ... but as soon as the 2nd argument has spaces i.e.

    <"command"> <"arg1_with_spaces">

    Everything i see on google says don't uses spaces ...

    Any other suggestions?

    Jim



    Dr.Ruud wrote:
    > Random Task schreef:
    >
    >> I am calling perl from gnu make on windows and I am having a problem
    >> with "arguments with spaces".

    >
    > Did you try to put "" around them?
    >
    Random Task, Mar 29, 2006
    #3
  4. Random Task

    Dr.Ruud Guest

    Random Task schreef:
    > Dr.Ruud:
    >> Random Task:


    Please don't top-post.

    >>> I am calling perl from gnu make on windows and I am having a problem
    >>> with "arguments with spaces".

    >>
    >> Did you try to put "" around them?

    >
    > Unfortunately yes ... I have tried
    > <"some exec filename with space"> -help
    > which executes fine ... but as soon as the 2nd argument has spaces
    > i.e.
    > <"command"> <"arg1_with_spaces">
    > Everything i see on google says don't uses spaces ...
    > Any other suggestions?


    I meant in your build rule. The error message is about "C:/Program\",
    and I see that part only in your build rule.

    You can also use the 8.3 name of "C:/Program Files", often
    "C:/PROGRA~1", see

    dir c:\p* /ad/x

    from a DOS-prompt.

    --
    Affijn, Ruud

    "Gewoon is een tijger."
    echo 014C8A26C5DB87DBE85A93DBF |perl -pe 'tr/0-9A-F/JunkshoP cartel,/'
    Dr.Ruud, Mar 29, 2006
    #4
  5. Random Task <> wrote in news::

    > Unfortunately yes ...


    Yes what? Oh, you are top-posting, please don't do that.

    > I have tried
    >
    > <"some exec filename with space"> -help
    >
    > which executes fine ... but as soon as the 2nd argument has spaces
    > i.e.
    >
    > <"command"> <"arg1_with_spaces">
    >


    D:\Home\asu1\UseNet\clpmisc\dat> cat Makefile
    main:
    perl "C:/Program Files/test.pl"


    D:\Home\asu1\UseNet\clpmisc\dat> make
    perl "C:/Program Files/test.pl"
    Can't open perl script "C:/Program Files/test.pl": No such file or
    directory
    make: *** [main] Error 2

    D:\Home\asu1\UseNet\clpmisc\dat> make -v
    GNU Make 3.80

    True, the file does not exist but this demonstrates that the argument is
    passed correctly to perl.

    Sinan
    --
    A. Sinan Unur <>
    (remove .invalid and reverse each component for email address)

    comp.lang.perl.misc guidelines on the WWW:
    http://augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html
    A. Sinan Unur, Mar 29, 2006
    #5
  6. Random Task

    Random Task Guest

    No chance you know how to get the 8.3 name for a path inside perl do you ?

    r.Ruud wrote:
    > Random Task schreef:
    >> Dr.Ruud:
    >>> Random Task:

    >
    > Please don't top-post.
    >
    >>>> I am calling perl from gnu make on windows and I am having a problem
    >>>> with "arguments with spaces".
    >>> Did you try to put "" around them?

    >> Unfortunately yes ... I have tried
    >> <"some exec filename with space"> -help
    >> which executes fine ... but as soon as the 2nd argument has spaces
    >> i.e.
    >> <"command"> <"arg1_with_spaces">
    >> Everything i see on google says don't uses spaces ...
    >> Any other suggestions?

    >
    > I meant in your build rule. The error message is about "C:/Program\",
    > and I see that part only in your build rule.
    >
    > You can also use the 8.3 name of "C:/Program Files", often
    > "C:/PROGRA~1", see
    >
    > dir c:\p* /ad/x
    >
    > from a DOS-prompt.
    >
    Random Task, Apr 4, 2006
    #6
  7. Random Task

    thundergnat Guest

    Random Task wrote:
    > No chance you know how to get the 8.3 name for a path inside perl do you ?
    >



    my $dos_path = Win32::GetShortPathName($path);
    thundergnat, Apr 4, 2006
    #7
  8. Random Task <> wrote:
    > No chance you know how to get the 8.3 name for a path inside perl do you ?
    >
    > r.Ruud wrote:
    >> Random Task schreef:
    >>> Dr.Ruud:
    >>>> Random Task:

    >>
    >> Please don't top-post.



    You were asked to stop.

    You did not stop.

    Many will now stop reading all of your future articles.

    Please don't top-post!


    --
    Tad McClellan SGML consulting
    Perl programming
    Fort Worth, Texas
    Tad McClellan, Apr 5, 2006
    #8
    1. Advertising

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. Peter

    1 day gnu, whole life gnu?

    Peter, Jan 10, 2005, in forum: Java
    Replies:
    3
    Views:
    324
    John C. Bollinger
    Jan 10, 2005
  2. Peter
    Replies:
    17
    Views:
    589
    Chris Smith
    Jan 13, 2005
  3. Markus Elfring
    Replies:
    2
    Views:
    356
    Markus Elfring
    Feb 23, 2005
  4. Efrat Regev

    Calling GNU/make from a Python Script

    Efrat Regev, Oct 30, 2006, in forum: Python
    Replies:
    5
    Views:
    350
  5. Daniel Pfeiffer

    GNU make & make.pl are dead: long live Perl makepp

    Daniel Pfeiffer, Sep 8, 2003, in forum: Perl Misc
    Replies:
    1
    Views:
    221
    Daniel Pfeiffer
    Sep 9, 2003
Loading...

Share This Page