It would be nice to have a module that returns the installed parrot config.
Other applications (hopefully a lot) that configure depending on parrot might
need this. I mean something like App::Info::HTTPD::Apache
(http://search.cpan.org/~dwheeler/App-Info-0.44/).
I am not into App::Info so I can not decide what is neccessary to make it
return parrot specific values ...
Adrian Lambeck
perldoc parrot/library/config.imc
Regards.
it's actually in 'runtime/parrot/library/config.imc'
Is this what you're looking for?
--
-----------
Adrian Lambeck
Basics EDV
Feldnerstr. 11
21075 Hamburg
Germany
Tel. 040/788 901 76
E-Mail: adrian....@basicsedv.de
.sub _some
# store the config data into $P0
$P0 = _config()
# Retrieve and print a key
$P1 = $P0["cc"]
print "Your C compiler is "
print $P1
print "\n"
.end
.include "library/config.imc"
Which, when run on my OS X box, gives:
oolong:~/research/parrot coke$ ./parrot foo.imc
Your C compiler is cc
How's that?
Adrian
--
[ please don't top post ]
> I will try it out to see if it works for me. Now I know how to get the
> data but how can I include this into a Makfile. If this were Perl-code
> I could use MakeMaker but this way I need to do it somehow different.
There's a TODO item in the bug tracker, which describes an extension to
parrot-config.imc.
$ ./parrot parrot-config.imc libs
-lnsl -ldl -lm -lposix -lcrypt -lutil -lpthread -lrt -lgmp
It should eventually understand shortcuts like --compile or --link or
some such.
For now you can include something like:
foo$(EXE) : foo.c $(PARROT) # or better the lib
`$(PARROT) parrot-config.imc link` \
`$(PARROT) parrot-config.imc libs` \
...
in the Makefile.
> By the way - in which file did you find this example.
You are citing it:
>> > Am Sonntag, 6. März 2005 20:13 schrieb Will Coleda via RT:
>> >>it's actually in 'runtime/parrot/library/config.imc'
$ perldoc -F runtime/parrot/library/config.imc
leo