Perl module with Makefiles
Julien ÉLIE
julien at trigofacile.com
Mon Jun 9 21:34:45 UTC 2008
Hi Russ,
> I'm not sure. Every system I've seen supports suffixes like that, but on
> some systems *.3pm files would normally be in a man3pm directory.
Thus, adding in Makefile.global:
MAN3PM = $(mandir)/man3
will allow people to change the installation path.
> I'm not
> positive that every man program will search appropriately to find a *.3pm
> file in a man3 directory. But it may be fine -- I'm just not sure.
Then:
MAN3PM_EXT = "3pm"
I suggest something like:
perl/Makefile
-------------
MAN = ../doc/man/INN__Config.3pm
../doc/man/INN__Config.3pm: INN/Config.pm
$(POD2MAN) -s '3pm' -n "INN::Config" $? > $@
doc/man/Makefile
----------------
SEC3PM = INN__Config.3pm
install-man3pm:
$(CP_MAN) INN__Config.3pm $D$(MAN3PM)/INN\:\:Config.$(MAN3PM_EXT)
It works pretty well.
The only problem is that we have to add a line in doc/man/Makefile for
each Perl module. But I believe it should not be a big issue :-)
I also tested more advances features like substitutions $(subst __,\:\:,MAN)
or $(foreach ...) but I am not very satisfied with them because they might
not work with every make program.
--
Julien ÉLIE
« Whenever you set out to do something, something else must be done first. »
(Murphy's Fourth Corollary)
More information about the inn-workers
mailing list