autoconf
[Top][All Lists]
Advanced

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

Re: Solution for building perl modules


From: Jeremy Slade
Subject: Re: Solution for building perl modules
Date: Tue, 27 Mar 2001 11:33:02 -0700 (MST)

Tim Van Holder writes:
> 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.

Yes, for me that is a non-issue.
 
> 
> > --- 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?

Much easier to fix than that, I think:
  WriteMakefile ( NAME => 'MyMod',
                  DEFINE => address@hidden@],
                  INC => address@hidden@/src/lib @address@hidden,
                  LIBS => address@hidden@/src/lib -lMyAPI_PIC],
                  INSTALLDIRS => 'perl' );


Jeremy
-- 
Jeremy Slade
Hewlett-Packard Company  VLSI Technology Center - http://cpus.hp.com/
address@hidden            (970) 898-7881




reply via email to

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