Re: The mechanics of an SDK

[email protected] (Michael G Schwern) Wed, 29 Aug 2001 02:48:19 -0400
Newsgroups perl.sdk
Message-ID <20010829024819.A5530@blackrider>
On Tue, Aug 28, 2001 at 10:08:16PM -0700, Ask Bjoern Hansen wrote:
> On Tue, 28 Aug 2001, Michael G Schwern wrote:
> > Let's say I want to put together an SDK.  Now.  I already have my
> > modules picked out.  Aside from CPAN bundles, how exactly does one
> > make an SDK?
> 
> I would make it as a big ol' tar ball with all the included modules,
> an installer (some kind of wrapper around CPAN.pm I reckon) and
> possibly some extra tests.

Ok then.  I just uploaded a Testing SDK to CPAN.
http://www.pobox.com/~schwern/src/Test-SDK-0.02.tar.gz

Here's how I did it, it's pretty easy.

    mkdir Test-SDK;
    cd Test-SDK;

write a Makefile.PL like so:

    use 5.004;

    use ExtUtils::MakeMaker;

    WriteMakefile(
        NAME            => 'Test-SDK',
        VERSION         => '0.01',
        INST_LIB        => './blib/lib',
        INST_ARCHLIB    => './blib/arch',
    );

Setting INST_LIB and INST_ARCHLIB means that when you run make, the
modules all get copied into Test-SDK/blib/lib/.  That way dependencies
are handled.

The "use 5.004" is the minimum perl version to make the modules in the
SDK work.

I then took three modules, Test::Harness, Test::Simple and
Test::Inline and unpacked them straight into Test-SDK/

-rw-r--r--    1 schwern  schwern       197 Aug 29 02:26 Makefile.PL
drwxr-sr-x    4 schwern  schwern      4096 Aug 29 02:30 Test-Harness-1.23
drwxr-sr-x    6 schwern  schwern      4096 Aug 29 02:30 Test-Inline-0.10
drwxr-sr-x    4 schwern  schwern      4096 Aug 29 02:30 Test-Simple-0.16

From here on it's a regular module.

    perl Makefile.PL
    make
    make manifest  (had to delete a few spurious things)
    make test

Throw in Changes and README files, run a "make dist" and *bang* SDK.


Now get off your asses and make some more!


-- 

Michael G. Schwern   <[email protected]>    http://www.pobox.com/~schwern/
Perl6 Quality Assurance     <[email protected]>	     Kwalitee Is Job One
"Let's face it," said bearded Rusty Simmons, opening a can after the
race.  "This is a good excuse to drink some beer."  At 10:30 in the
morning?  "Well, it's past noon in Dublin," said teammate Mike
[Joseph] Schwern.  "It's our duty."
    -- "Sure, and It's a Great Day for Irish Runners" 
       Newsday, Sunday, March 20, 1988