diff options
author | Michael G. Schwern <schwern@pobox.com> | 2000-12-05 14:21:21 -0500 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-12-06 15:00:32 +0000 |
commit | 0b9c804f147362c4de1fd7a6d871df1c2b15e31d (patch) | |
tree | cfe666ff0dfa817c1543171ccb6ac53607431df8 /lib | |
parent | 54ad72ea23e2349f9b9a56380fab6914c84f6b1c (diff) | |
download | perl-0b9c804f147362c4de1fd7a6d871df1c2b15e31d.tar.gz |
Default MANIFEST.SKIP]
Message-ID: <20001205192121.A6473@blackrider.aocn.com>
Add a default MANIFEST skip that ignores things like
version control files, editor temporary files, and the Makefile.
p4raw-id: //depot/perl@8008
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ExtUtils/MANIFEST.SKIP | 16 | ||||
-rw-r--r-- | lib/ExtUtils/Manifest.pm | 41 |
2 files changed, 50 insertions, 7 deletions
diff --git a/lib/ExtUtils/MANIFEST.SKIP b/lib/ExtUtils/MANIFEST.SKIP new file mode 100644 index 0000000000..a203d8f615 --- /dev/null +++ b/lib/ExtUtils/MANIFEST.SKIP @@ -0,0 +1,16 @@ +# Avoid version control files. +\bRCS\b +\bCVS\b +,v$ + +# Avoid Makemaker generated and utility files. +^MANIFEST\. +^Makefile$ +^blib/ +^MakeMaker-\d +^pm_to_blib$ + +# Avoid temp and backup files. +~$ +\.old$ +\#$ diff --git a/lib/ExtUtils/Manifest.pm b/lib/ExtUtils/Manifest.pm index 80f332c5b6..4b98185e93 100644 --- a/lib/ExtUtils/Manifest.pm +++ b/lib/ExtUtils/Manifest.pm @@ -4,11 +4,12 @@ require Exporter; use Config; use File::Find; use File::Copy 'copy'; +use File::Spec::Functions qw(splitpath); use Carp; use strict; use vars qw($VERSION @ISA @EXPORT_OK - $Is_VMS $Debug $Verbose $Quiet $MANIFEST $found); + $Is_VMS $Debug $Verbose $Quiet $MANIFEST $found $DEFAULT_MSKIP); $VERSION = substr(q$Revision: 1.33 $, 10); @ISA=('Exporter'); @@ -18,10 +19,11 @@ $VERSION = substr(q$Revision: 1.33 $, 10); $Is_VMS = $^O eq 'VMS'; if ($Is_VMS) { require File::Basename } -$Debug = 0; +$Debug = $ENV{PERL_MM_MANIFEST_DEBUG} || 0; $Verbose = 1; $Quiet = 0; $MANIFEST = 'MANIFEST'; +$DEFAULT_MSKIP = (splitpath($INC{"ExtUtils/Manifest.pm"}))[1]."$MANIFEST.SKIP"; # Really cool fix from Ilya :) unless (defined $Config{d_link}) { @@ -160,8 +162,7 @@ sub _maniskip { my @skip ; $mfile ||= "$MANIFEST.SKIP"; local *M; - return $matches unless -f $mfile; - open M, $mfile or return $matches; + open M, $mfile or open M, $DEFAULT_MSKIP or return $matches; while (<M>){ chomp; next if /^#/; @@ -344,15 +345,27 @@ expressions should appear one on each line. Blank lines and lines which start with C<#> are skipped. Use C<\#> if you need a regular expression to start with a sharp character. A typical example: + # Version control files and dirs. \bRCS\b + \bCVS\b + ,v$ + + # Makemaker generated files and dirs. ^MANIFEST\. ^Makefile$ - ~$ - \.html$ - \.old$ ^blib/ ^MakeMaker-\d + # Temp, old and emacs backup files. + ~$ + \.old$ + ^#.*#$ + +If no MANIFEST.SKIP file is found, a default set of skips will be +used, similar to the example above. If you want nothing skipped, +simply make an empty MANIFEST.SKIP file. + + =head1 EXPORT_OK C<&mkmanifest>, C<&manicheck>, C<&filecheck>, C<&fullcheck>, @@ -369,6 +382,10 @@ and a developer version including RCS). C<$ExtUtils::Manifest::Quiet> defaults to 0. If set to a true value, all functions act silently. +C<$ExtUtils::Manifest::Debug> defaults to 0. If set to a true value, +or if PERL_MM_MANIFEST_DEBUG is true, debugging output will be +produced. + =head1 DIAGNOSTICS All diagnostic output is sent to C<STDERR>. @@ -397,6 +414,16 @@ to MANIFEST. $Verbose is set to 1 by default. =back +=head1 ENVIRONMENT + +=over 4 + +=item B<PERL_MM_MANIFEST_DEBUG> + +Turns on debugging + +=back + =head1 SEE ALSO L<ExtUtils::MakeMaker> which has handy targets for most of the functionality. |