From: Rafael Garcia-Suarez Date: Tue, 16 Dec 2003 22:00:39 +0000 (+0000) Subject: Sync with the latest MakeMaker snapshot. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=03c94fc27a6457bae8911c7fd0efb852cd061468;p=p5sagit%2Fp5-mst-13.2.git Sync with the latest MakeMaker snapshot. But set the $VERSION to 6.21_01. p4raw-id: //depot/perl@21918 --- diff --git a/lib/ExtUtils/Changes b/lib/ExtUtils/Changes index a9c8629..ff41425 100644 --- a/lib/ExtUtils/Changes +++ b/lib/ExtUtils/Changes @@ -1,5 +1,22 @@ +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 diff --git a/lib/ExtUtils/MANIFEST.SKIP b/lib/ExtUtils/MANIFEST.SKIP index 854b78c..945b339 100644 --- a/lib/ExtUtils/MANIFEST.SKIP +++ b/lib/ExtUtils/MANIFEST.SKIP @@ -1,6 +1,7 @@ # Avoid version control files. \bRCS\b \bCVS\b +\bSCCS\b ,v$ \B\.svn\b diff --git a/lib/ExtUtils/META.yml b/lib/ExtUtils/META.yml index c111e13..b8941ff 100644 --- a/lib/ExtUtils/META.yml +++ b/lib/ExtUtils/META.yml @@ -1,7 +1,7 @@ # 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: @@ -11,4 +11,4 @@ requires: Pod::Man: 0 distribution_type: module -generated_by: ExtUtils::MakeMaker version 6.21 +generated_by: ExtUtils::MakeMaker version 6.22 diff --git a/lib/ExtUtils/MM_Any.pm b/lib/ExtUtils/MM_Any.pm index 3e1673c..971fb8d 100644 --- a/lib/ExtUtils/MM_Any.pm +++ b/lib/ExtUtils/MM_Any.pm @@ -107,7 +107,7 @@ sub blibdirs_target { 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"; diff --git a/lib/ExtUtils/MM_Unix.pm b/lib/ExtUtils/MM_Unix.pm index ae94d5f..6e48d6c 100644 --- a/lib/ExtUtils/MM_Unix.pm +++ b/lib/ExtUtils/MM_Unix.pm @@ -1237,7 +1237,7 @@ WARNING 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 @@ -2641,7 +2641,7 @@ realclean :: 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 @@ -2972,8 +2972,8 @@ $(OBJECT) : $(FIRST_MAKEFILE) $(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. <==" @@ -3845,7 +3845,7 @@ test :: \$(TEST_TYPE) "); 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}})); @@ -4039,7 +4039,7 @@ $(O_FILES): $(H_FILES) ' if @{$self->{O_FILES} || []} && @{$self->{H} || []}; push @m, q{ -help: +help : perldoc ExtUtils::MakeMaker }; diff --git a/lib/ExtUtils/MM_Win95.pm b/lib/ExtUtils/MM_Win95.pm index 0c50461..13b1123 100644 --- a/lib/ExtUtils/MM_Win95.pm +++ b/lib/ExtUtils/MM_Win95.pm @@ -192,6 +192,20 @@ RCLEAN } +=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 diff --git a/lib/ExtUtils/MakeMaker.pm b/lib/ExtUtils/MakeMaker.pm index 3891215..10ef38e 100644 --- a/lib/ExtUtils/MakeMaker.pm +++ b/lib/ExtUtils/MakeMaker.pm @@ -2,8 +2,8 @@ package ExtUtils::MakeMaker; 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; @@ -2064,7 +2064,7 @@ MakeMaker object. The following lines will be parsed o.k.: $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 diff --git a/lib/ExtUtils/MakeMaker/FAQ.pod b/lib/ExtUtils/MakeMaker/FAQ.pod index 16a64e0..a52f256 100644 --- a/lib/ExtUtils/MakeMaker/FAQ.pod +++ b/lib/ExtUtils/MakeMaker/FAQ.pod @@ -1,6 +1,6 @@ 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__ @@ -13,6 +13,46 @@ ExtUtils::MakeMaker::FAQ - Frequently Asked Questions About MakeMaker FAQs, tricks and tips for C. + +=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 @@ -28,13 +68,13 @@ compatibility. 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: @@ -52,11 +92,12 @@ 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 @@ -75,7 +116,7 @@ system's revision number (you are using version control, right?). 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. @@ -88,7 +129,7 @@ If branches are involved (ie. $Z<>Revision: 1.5.3.4) its a little more 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 thing and how did it get in my F?! diff --git a/lib/ExtUtils/instmodsh b/lib/ExtUtils/instmodsh index f568e88..90d36c2 100644 --- a/lib/ExtUtils/instmodsh +++ b/lib/ExtUtils/instmodsh @@ -1,4 +1,4 @@ -#!/usr/local/bin/perl -w +#!/usr/bin/perl -w use strict; use IO::File; @@ -24,91 +24,125 @@ validate your packlists and even create a tarball from an installed module. =cut -sub do_module($) -{ -my ($module) = @_; -my $help = < - 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 = ; 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 = ; 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() { @@ -145,10 +179,11 @@ while (1) } } -################################################################################ + +############################################################################### $Inst = ExtUtils::Installed->new(); @Modules = $Inst->modules(); toplevel(); -################################################################################ +###############################################################################