Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

autarch (914)

autarch
  (email not shown publicly)
http://www.vegguide.org/

Journal of autarch (914)

Wednesday July 18, 2001
11:31 AM

MakeMaker and your MANIFEST

[ #446 ]

So yesterday I released three new versions of Alzabo in quick succession, making me feel like a big dummy. I kept realizing I had left out new files from the MANIFEST, so they weren't making it into the tarball.

Well, it turns out that the Makefile MakeMaker generates for you has a handy target called 'distcheck'. When you run 'make distcheck' it checks that your MANIFEST contains all the files in the below the current directory (recursively). It also checks that there are no files in the MANIFEST that are missing from the directory. You can control some of these checks via the MANIFEST.SKIP file, into which you place regular expressions for files that can be ignore, like '.*CVS.*' or '^\.#'.

This is pretty neat. Now I've hacked up my Makefile.PL with this code:

package MY;

sub dist_core
{
        my $self = shift;

        my $dist_core = $self->SUPER::dist_core(@_);

        $dist_core =~ s/dist : (\$\(DIST_DEFAULT\))/dist : $1 distcheck/;

        return $dist_core;
}

This changes the 'make dist' target to run the 'distcheck' target after making the tarball. I'd run distcheck first but making the tarball scrolls it of the screen (maybe I need a 'pause' target that waits for a keystroke). This way I _always_ will get a distcheck before flinging tarballs about the net.

This stuff is all documented in ExtUtils::MakeMaker apparently, not that I knew that (doh!).