But set the $VERSION to 6.21_01.
p4raw-id: //depot/perl@21918
+6.22
+ - Minor potential glitch in the version check logic.
+ - Making Makefile rebuild logic more resistant to inconsequential
+ errors when cleaning up things that are going to be rebuilt anyway.
+ - Adding SCCS to the list of directories in MANIFEST.SKIP.
+ - Fixing blibdirs so it doesn't rebuild every make run.
+ - Using a more conservative MAX_EXEC_LEN for Win98 to allow building
+ large modules like Encode. [Greg Matheson]
+ - test target mangled by dmake. Doesn't seem to like q{}.
+ [Greg Matheson]
+ - instmodsh now using Archive::Tar to create archives if available.
+ [Slaven Rezic]
+ - instmodsh now using more portable tar flags to create archives.
+ [Slaven Rezic]
+ - Added FAQ entry for "How do I use a module without installing it?"
+ and "How do I keep from installing man pages?" [Joe Cromie]
+
6.21 Tue Nov 11 00:12:56 PST 2003
- - NetBSD was looking in INSTALLARCHLIB/CORE for libperl isntead of
+ - NetBSD was looking in INSTALLARCHLIB/CORE for libperl instead of
PERL_ARCHLIB/CORE. Would cause problems if INSTALLARCHLIB was changed
(ie. LIB or PREFIX used). [Jochen Eisinger]
- Turns out a handful of modules use dir_target(). Restored a version
# Avoid version control files.
\bRCS\b
\bCVS\b
+\bSCCS\b
,v$
\B\.svn\b
# http://module-build.sourceforge.net/META-spec.html
#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
name: ExtUtils-MakeMaker
-version: 6.21
+version: 6.22
version_from: lib/ExtUtils/MakeMaker.pm
installdirs: perl
requires:
Pod::Man: 0
distribution_type: module
-generated_by: ExtUtils::MakeMaker version 6.21
+generated_by: ExtUtils::MakeMaker version 6.22
my @mkpath = $self->split_command('$(NOECHO) $(MKPATH)', @dirs);
my @chmod = $self->split_command('$(NOECHO) $(CHMOD) 755', @dirs);
- my $make = "\nblibdirs :: \n";
+ my $make = "\nblibdirs :: Makefile.PL \n";
$make .= join "", map { "\t$_\n" } @mkpath, @chmod;
$make .= "\t\$(NOECHO) \$(TOUCH) blibdirs\n\n";
next unless $self->maybe_command($abs);
print "Executing $abs\n" if ($trace >= 2);
- my $version_check = qq{$abs -e "require $ver; print qq{VER_OK\n}"};
+ my $version_check = qq{$abs -le "require $ver; print qq{VER_OK}"};
# To avoid using the unportable 2>&1 to supress STDERR,
# we close it before running the command.
# However, thanks to a thread library bug in many BSDs
last unless defined $from;
my $todir = dirname($to);
push @m, "
-$to: $from \$(FIRST_MAKEFILE) blibdirs
+$to : $from \$(FIRST_MAKEFILE) blibdirs
\$(NOECHO) \$(RM_F) $to
\$(CP) $from $to
\$(FIXIN) $to
$(FIRST_MAKEFILE) : Makefile.PL $(CONFIGDEP)
$(NOECHO) $(ECHO) "Makefile out-of-date with respect to $?"
$(NOECHO) $(ECHO) "Cleaning current config before rebuilding Makefile..."
- $(NOECHO) $(RM_F) $(MAKEFILE_OLD)
- $(NOECHO) $(MV) $(FIRST_MAKEFILE) $(MAKEFILE_OLD)
+ -$(NOECHO) $(RM_F) $(MAKEFILE_OLD)
+ -$(NOECHO) $(MV) $(FIRST_MAKEFILE) $(MAKEFILE_OLD)
-$(MAKE) -f $(MAKEFILE_OLD) clean $(DEV_NULL) || $(NOOP)
$(PERLRUN) Makefile.PL }.join(" ",map(qq["$_"],@ARGV)).q{
$(NOECHO) $(ECHO) "==> Your Makefile has been rebuilt. <=="
");
if ($Is_Win95) {
- push(@m, map(qq{\t\$(NOECHO) \$(PERLRUN) -e "exit unless -f shift; chdir '$_'; system q{\$(MAKE) test \$(PASTHRU)}" \$(FIRST_MAKEFILE)\n}, @{$self->{DIR}}));
+ push(@m, map(qq{\t\$(NOECHO) \$(PERLRUN) -e "exit unless -f shift; chdir '$_'; system q[\$(MAKE) test \$(PASTHRU)]" \$(FIRST_MAKEFILE)\n}, @{$self->{DIR}}));
}
else {
push(@m, map("\t\$(NOECHO) cd $_ && \$(TEST_F) \$(FIRST_MAKEFILE) && \$(MAKE) test \$(PASTHRU)\n", @{$self->{DIR}}));
' if @{$self->{O_FILES} || []} && @{$self->{H} || []};
push @m, q{
-help:
+help :
perldoc ExtUtils::MakeMaker
};
}
+=item max_exec_len
+
+Win98 chokes on things like Encode if we set the max length to nmake's max
+of 2K. So we go for a more conservative value of 1K.
+
+=cut
+
+sub max_exec_len {
+ my $self = shift;
+
+ return $self->{_MAX_EXEC_LEN} ||= 1024;
+}
+
+
=item os_flavor
Win95 and Win98 and WinME are collectively Win9x and Win32
BEGIN {require 5.005_03;}
-$VERSION = '6.21';
-($Revision) = q$Revision: 1.144 $ =~ /Revision:\s+(\S+)/;
+$VERSION = '6.21_01';
+($Revision) = q$Revision: 1.145 $ =~ /Revision:\s+(\S+)/;
require Exporter;
use Config;
$VERSION = '1.00';
*VERSION = \'1.01';
- $VERSION = sprintf "%d.%03d", q$Revision: 1.144 $ =~ /(\d+)/g;
+ $VERSION = sprintf "%d.%03d", q$Revision: 1.145 $ =~ /(\d+)/g;
$FOO::VERSION = '1.10';
*FOO::VERSION = \'1.11';
our $VERSION = 1.2.3; # new for perl5.6.0
package ExtUtils::MakeMaker::FAQ;
-(our $VERSION) = sprintf "%03d", q$Revision: 1.9 $ =~ /Revision:\s+(\S+)/;
+(our $VERSION) = sprintf "%03d", q$Revision: 1.10 $ =~ /Revision:\s+(\S+)/;
1;
__END__
FAQs, tricks and tips for C<ExtUtils::MakeMaker>.
+
+=head2 Module Installation
+
+=over 4
+
+=item How do I keep from installing man pages?
+
+Recent versions of MakeMaker will only install man pages on Unix like
+operating systems.
+
+For an individual module:
+
+ perl Makefile.PL INSTALLMAN1DIR=none INSTALLMAN3DIR=none
+
+If you want to suppress man page installation for all modules you have
+to reconfigure Perl and tell it 'none' when it asks where to install
+man pages.
+
+
+=item How do I use a module without installing it?
+
+Two ways. One is to build the module normally...
+
+ perl Makefile.PL
+ make
+
+...and then set the PERL5LIB environment variable to point at the
+blib/lib and blib/arch directories.
+
+The other is to install the module in a temporary location.
+
+ perl Makefile.PL PREFIX=/tmp LIB=/tmp/lib/perl
+
+And then set PERL5LIB to /tmp/lib/perl. This works well when you have
+multiple modules to work with. It also ensures that the module goes
+through its full installation process which may modify it.
+
+=back
+
+
=head2 Philosophy and History
=over 4
Perl is one of the most ported pieces of software ever. It works on
operating systems I've never even heard of (see perlport for details).
It needs a build tool that can work on all those platforms and with
-any wacky C compilers they might have.
+any wacky C compilers and linkers they might have.
-No such build tool existed at the time and I only know of one now
-(Module::Build).
+No such build tool exists. Even make itself has wildly different
+dialects. So we have to build our own.
-=item What's Module::Build and how does it relate to MakeMaker?
+=item What is Module::Build and how does it relate to MakeMaker?
Module::Build is a project by Ken Williams to supplant MakeMaker.
Its primary advantages are:
=back
Module::Build is the official heir apparent to MakeMaker and we
-encourage people to work on M::B rather than spending time improving
-MakeMaker.
+encourage people to work on M::B rather than spending time adding features
+to MakeMaker.
=back
+
=head2 Module Writing
=over 4
In CVS and RCS you use $Z<>Revision$ writing it like so:
- $VERSION = sprintf "%d.%03d", q$Revision: 1.9 $ =~ /(\d+)/g;
+ $VERSION = sprintf "%d.%03d", q$Revision: 1.10 $ =~ /(\d+)/g;
Every time the file is checked in the $Z<>Revision$ will be updated,
updating your $VERSION.
complicated.
# must be all on one line or MakeMaker will get confused.
- $VERSION = do { my @r = (q$Revision: 1.9 $ =~ /\d+/g); sprintf "%d."."%03d" x $#r, @r };
+ $VERSION = do { my @r = (q$Revision: 1.10 $ =~ /\d+/g); sprintf "%d."."%03d" x $#r, @r };
=item What's this F<META.yml> thing and how did it get in my F<MANIFEST>?!
-#!/usr/local/bin/perl -w
+#!/usr/bin/perl -w
use strict;
use IO::File;
=cut
-sub do_module($)
-{
-my ($module) = @_;
-my $help = <<EOF;
+my $Module_Help = <<EOF;
Available commands are:
f [all|prog|doc] - List installed files of a given type
d [all|prog|doc] - List the directories used by a module
v - Validate the .packlist - check for missing files
t <tarfile> - Create a tar archive of the module
+ h - Display module help
q - Quit the module
EOF
-print($help);
-while (1)
- {
- print("$module cmd? ");
- my $reply = <STDIN>; chomp($reply);
- CASE:
- {
- $reply =~ /^f\s*/ and do
- {
- my $class = (split(' ', $reply))[1];
- $class = 'all' if (! $class);
- my @files;
- if (eval { @files = $Inst->files($module, $class); })
- {
- print("$class files in $module are:\n ",
- join("\n ", @files), "\n");
- last CASE;
- }
- else
- { print($@); }
- };
- $reply =~ /^d\s*/ and do
- {
- my $class = (split(' ', $reply))[1];
- $class = 'all' if (! $class);
- my @dirs;
- if (eval { @dirs = $Inst->directories($module, $class); })
- {
- print("$class directories in $module are:\n ",
- join("\n ", @dirs), "\n");
- last CASE;
- }
- else
- { print($@); }
- };
- $reply =~ /^t\s*/ and do
- {
- my $file = (split(' ', $reply))[1];
- my $tmp = "/tmp/inst.$$";
- if (my $fh = IO::File->new($tmp, "w"))
- {
- $fh->print(join("\n", $Inst->files($module)));
- $fh->close();
- system("tar cvf $file -I $tmp");
- unlink($tmp);
- last CASE;
- }
- else { print("Can't open $file: $!\n"); }
- last CASE;
- };
- $reply eq 'v' and do
- {
- if (my @missing = $Inst->validate($module))
- {
- print("Files missing from $module are:\n ",
- join("\n ", @missing), "\n");
- }
- else
- {
- print("$module has no missing files\n");
- }
- last CASE;
- };
- $reply eq 'q' and do
- {
- return;
- };
- # Default
- print($help);
- }
- }
+
+my %Module_Commands = (
+ f => \&list_installed,
+ d => \&list_directories,
+ v => \&validate_packlist,
+ t => \&create_archive,
+ h => \&module_help,
+ );
+
+sub do_module($) {
+ my ($module) = @_;
+
+ print($Module_Help);
+ MODULE_CMD: while (1) {
+ print("$module cmd? ");
+
+ my $reply = <STDIN>; chomp($reply);
+ my($cmd) = $reply =~ /^(\w)\b/;
+
+ last if $cmd eq 'q';
+
+ if( $Module_Commands{$cmd} ) {
+ $Module_Commands{$cmd}->($reply, $module);
+ }
+ elsif( $cmd eq 'q' ) {
+ last MODULE_CMD;
+ }
+ else {
+ module_help();
+ }
+ }
+}
+
+
+sub list_installed {
+ my($reply, $module) = @_;
+
+ my $class = (split(' ', $reply))[1];
+ $class = 'all' unless $class;
+
+ my @files;
+ if (eval { @files = $Inst->files($module, $class); }) {
+ print("$class files in $module are:\n ",
+ join("\n ", @files), "\n");
+ }
+ else {
+ print($@);
+ }
+};
+
+
+sub list_directories {
+ my($reply, $module) = @_;
+
+ my $class = (split(' ', $reply))[1];
+ $class = 'all' unless $class;
+
+ my @dirs;
+ if (eval { @dirs = $Inst->directories($module, $class); }) {
+ print("$class directories in $module are:\n ",
+ join("\n ", @dirs), "\n");
+ }
+ else {
+ print($@);
+ }
}
-################################################################################
+
+sub create_archive {
+ my($reply, $module) = @_;
+
+ my $file = (split(' ', $reply))[1];
+ my $tmp = "/tmp/inst.$$";
+
+ if( !(defined $file and length $file) ) {
+ print "No tar file specified\n";
+ }
+ elsif( eval { require Archive::Tar } ) {
+ Archive::Tar->create_archive($file, 0, $Inst->files($module));
+ }
+ else {
+ my($first, @rest) = $Inst->files($module);
+ system('tar', 'cvf', $file, $first);
+ for my $f (@rest) {
+ system('tar', 'rvf', $file, $f);
+ }
+ print "Can't use tar\n" if $?;
+ }
+}
+
+
+sub validate_packlist {
+ my($reply, $module) = @_;
+
+ if (my @missing = $Inst->validate($module)) {
+ print("Files missing from $module are:\n ",
+ join("\n ", @missing), "\n");
+ }
+ else {
+ print("$module has no missing files\n");
+ }
+}
+
+sub module_help {
+ print $Module_Help;
+}
+
+
+
+##############################################################################
sub toplevel()
{
}
}
-################################################################################
+
+###############################################################################
$Inst = ExtUtils::Installed->new();
@Modules = $Inst->modules();
toplevel();
-################################################################################
+###############################################################################