On Fri, 22 Aug 2008, Rob Dixon wrote:

Patrick Dupre wrote:

How can I modify my Makefile.PL to have a Makefile which can make
cc -o test.o -c test.c `perl -MExtUtils::Embed -e ccopts`

Thank

Makefile.PL is a program written using ExtUtils::MakeMaker to generate a
makefile for building a Perl /extension/ module.

ExtUtils::Embed is a module that will generate C code and compile/link options
for /embedding/ a perl interpreter into a C program.

Extending and embedding Perl are two very different, almost opposite ideas.

Since it looks like you have a program called test.c I assume you want to embed
a perl interpreter into that program, and if so you can forget about
Makefile.PL. But in that case what are you asking? You clearly know how to
compile test.c as you have written it in your post, and it is straightforward to
write a makefile to do that if you want to.

So what help do you need from us?


In fact, I have a Makefile.Pl because I am using ExtUtils to generate
c for perl (with xs), but I also need to call a perl subroutine for c !!
I know, it may be not elegant, but it is where I am !!

So I need the Makefile.PL correct to generate the lib for perl
and to compile the c to have it be able to call perl.

--
---
==========================================================================
 Patrick DUPRÉ                      |   |
 Department of Chemistry            |   |    Phone: (44)-(0)-1904-434384
 The University of York             |   |    Fax:   (44)-(0)-1904-432516
 Heslington                         |   |
 York YO10 5DD  United Kingdom      |   |    email: [EMAIL PROTECTED]
==========================================================================
-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/

Reply via email to