I'm starting to realise that ExtUtils::MakeMaker (Perl's way of making modules easily installable) isn't all it's cracked up to be.
Problem 1: some time ago I made a Perl binding for a C++ library, and
wanted MakeMaker to handle the compilation and so on. It turns out that
MakeMaker has never heard of C++, so you have to tell it everything is
in C, and that the C compiler and the linker are really called
c++, really. For example:
use ExtUtils::MakeMaker; # MakeMaker only understands C, so we tell it to use # the C++ compiler for C. $CC = 'c++'; WriteMakefile( ... XSOPT => '-C++', # Tell xsubpp to make C++ LIBS => [ '-lfoo' ], CC => $CC, LD => '$(CC)', );
Problem 2: I want to package up my Vim syntax coloring module, which needs some auxilary files (a Vim script, a CSS stylesheet and an XSL stylesheet). Those should be installed under a directory like /usr/share/something (depending on where everything else is going to go). There doesn't seem to be any way of getting MakeMaker to do this, short of adding bits to the makefile myself, which I'm not really interested in doing right now. Current solution: leave instructions telling the user to put things in the right place by hand, and edit the path hardcoded into the Perl to match.
Problem 3: I ask it to install in /home/qef/usr but it puts everything in /home/qef/usr/local:
perl Makefile.PL prefix=~/usr
It's actually installing things under $(SITEPREFIX) instead of
$(PREFIX). The former is just made by adding /local to the
later, but that's not what I want. I'm sure it used to work right.
I also tried setting the variable LIB instead of PREFIX, which
the man page mentions, but that doen't set the place to install man pages
or executables.
Damn.