MakeMaker makes me mad

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.

< Computer archaeology, invention of smiley | MySQL boredom >

Miniblog

(nuggets of inanity)

Tuesday Apr 24th 2007, 16:54 »
Just took the annual web design survey that AListApart do. I don't realy consider myself to be a web designer, but I have been doing a lot of HTML and CSS lately.
Monday Apr 23rd 2007, 18:23 »
Strange, there appears to be a bare-knuckle boxing match going on in the field outside my flat. Wish they wouldn't make so much noise about it.
Thursday Mar 1st 2007, 18:47 »
“In its written form, Hebrew has no vowels, making it the ideal language for texting.”
—Said in jest on some Radio 4 programme just now.

Archive: 2007 · 2006 · 2005 · 2004
Feed