Chas. Owens wrote:
On Thu, Jul 30, 2009 at 19:28, Patrick Dupre<pd...@york.ac.uk> wrote:
Hello,
Insi de my Makefile.PL, I would like to do something like:
LIBS => ['-lm -L$(PATH) -lmlib'],
with $PATH define at the beginning of the file, but I cannot make it
work !!!!
What am I doing wrong ?
snip
I see two things wrong: single quotes don't interpolate, $(PATH)
doesn't mean what you thing it means. Change the code to:
LIBS => [ "-lm -L$PATH -lmlib" ],
"$(PATH)" expands to $( . 'PATH)', $( is the real GID of the current
process (see [perldoc perlvar][1]). You may have meant "${PATH}", but
that is not necessary since the string is not ambiguous (it is need in
cases like this "${foo}bar" where Perl will think you want the
variable $foobar rather than what you want: $foo).
[1] : http://perldoc.perl.org/perlvar.html#$(
I don't think he wants it interpolated; he is talking about make(1)
here. Inside a Makefile, variables are written like $(VAR) except when
you set them. Then just the unadorned word is used.
How about:
LIBS => ['-lm', '-L$(PATH)', '-lmlib'],
or:
LIBS => [qw(-lm -L$(PATH) -lmlib)],
--
Just my 0.00000002 million dollars worth,
Shawn
Programming is as much about organization and communication
as it is about coding.
My favourite four-letter word is "Done!"
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/