Perl module with Makefiles

Russ Allbery rra at stanford.edu
Mon Jun 9 22:23:01 UTC 2008


Julien ÉLIE <julien at trigofacile.com> writes:

> 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)

That looks fine to me.

> 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.

Yeah, in general you can only rely on that stuff being available with GNU
make.  Now, INN already does require a make that supports include, but I
think that's a much weaker requirement.

-- 
Russ Allbery (rra at stanford.edu)             <http://www.eyrie.org/~eagle/>

    Please send questions to the list rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.


More information about the inn-workers mailing list