[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Solution for building perl modules
From: |
Tim Van Holder |
Subject: |
Re: Solution for building perl modules |
Date: |
27 Mar 2001 09:05:41 +0200 |
On 26 Mar 2001 15:24:16 -0700, Jeremy Slade wrote:
> .made_mode = MyMod.C Makefile.perl
> $(MAKE) -fMakefile.perl
> touch $@
Minor portability issue: try to avoid names starting with leading dots.
If your code is supposed to never run on DOS, this doesn't matter that
much though.
> --- src/perl/Makefile.PL.in -----------------------
> use ExtUtils::MakeMaker;
> WriteMakefile ( NAME => 'MyMod',
> DEFINE => '@DEFS@',
> INC => 'address@hidden@/src/lib @CPPFLAGS@',
> LIBS => 'address@hidden@/src/lib -lMyAPI_PIC ',
> INSTALLDIRS => 'perl' );
> ---------------------------------------------------
One major flaw here is that you can't be sure that none of the
AC_SUBST'ed
variables contain single quotes. Not sure how you'd handle that cleanly
though. Perhaps you could use sed to escape them and then AC_SUBST
the results as DEFS_PL, top_srcdir_pl and CPPFLAGS_PL?
> This method isn't foolproof, super robust. For building the perl
> extension, most of the 'configuration' comes from the perl Config.pm,
> so whatever is configured in the various other Makefiles is not
> reflected in the Makefile.perl. Perhaps that's not an issue -- what
> do the experts think?
Agreed - generally Perl is supposed to know best. (Note: just because I
am responding
to this question does not mean I consider myself an expert - far from
it).