[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

using automake for perl program

From: Guillaume Rousse
Subject: using automake for perl program
Date: Thu, 30 Mar 2006 00:11:23 +0200
User-agent: Mail/News 1.5 (X11/20060225)


I'm investigating the use of autotools for building and installing a
perl program, because standard tools as MakeMaker or Module::Install,
while perfectly suited for perl modules, are quite limited when dealing
with programs with data, configuration, etc...

However, I'm having some troubles...

1) module destination directory is determined by perl itself. I use
moduledir=`perl '-V:installsitelib' | cut -d"'" -f2` to compute it, but
it make perl distcheck fails:
test -z "/usr/lib/perl5/site_perl/5.8.8" || mkdir -p --
mkdir: cannot create directory `/usr/lib/perl5/site_perl/5.8.8':
Permission denied

I guess it is because moduledir doesn't relate to $prefix...

2) each perl module correspond to a man page, produced by pod2man.
However, I can't compute man page list from module list.

I tried several variations around
MODULES = foo/bar foo/baz
nobase_dist_module_DATA =  $(addprefix lib/,$(addsuffix .pm,$(MODULES)))
man3_MANS = $(subst /,::,$(addsuffix .3pm,$(MODULES)))

Result: Makefile:270: *** target pattern contains no `%'.  Stop.
Moreover, I have no idea of portability over BSD make of those constructs.

3) I couldn't neither achieve a suffix-based rule for building a single
man page. Is this allowed ?
%.3pm: lib/$(subst /,::,%).pm
        pod2man $< > $@

Facing to all those problems, I'm more and more considering delegating
modules management to MakeMaker, invocated from a top-level
automake-generated makefile. Does it seems raisonable ?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]