Help calling perl from gnu make on windows

R

Random Task

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
 
D

Dr.Ruud

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?
 
R

Random Task

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
 
D

Dr.Ruud

Random Task schreef:

Please don't top-post.
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.
 
A

A. Sinan Unur

Random Task said:
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 <[email protected]>
(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
 
T

Tad McClellan

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


You were asked to stop.

You did not stop.

Many will now stop reading all of your future articles.

Please don't top-post!
 

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,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top