From: Rafael Garcia-Suarez Date: Tue, 11 Nov 2003 20:13:56 +0000 (+0000) Subject: Upgrade to MakeMaker 6.21. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=af7522e504e83efd47b2efb524ba845e5e5a93f1;p=p5sagit%2Fp5-mst-13.2.git Upgrade to MakeMaker 6.21. p4raw-id: //depot/perl@21702 --- diff --git a/lib/ExtUtils/Changes b/lib/ExtUtils/Changes index 0342d04..a9c8629 100644 --- a/lib/ExtUtils/Changes +++ b/lib/ExtUtils/Changes @@ -1,3 +1,12 @@ +6.21 Tue Nov 11 00:12:56 PST 2003 + - NetBSD was looking in INSTALLARCHLIB/CORE for libperl isntead 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 + for backwards compatibility. + - Moved blibdirs target from top_targets() to its own section. Lots of + modules rewrite top_targets() so blibdirs wouldn't be written. + 6.20 Thu Nov 6 02:25:58 PST 2003 - Fixing dos2unix on Cygwin. In-place editing doesn't work 100% so we take a more conservative approach. diff --git a/lib/ExtUtils/Install.pm b/lib/ExtUtils/Install.pm index 212b7c4..a744a6f 100644 --- a/lib/ExtUtils/Install.pm +++ b/lib/ExtUtils/Install.pm @@ -398,6 +398,7 @@ sub run_filter { Copies each key of %from_to to its corresponding value efficiently. Filenames with the extension .pm are autosplit into the $autosplit_dir. +Any destination directories are created. $filter_cmd is an optional shell command to run each .pm file through prior to splitting and copying. Input is the contents of the module, @@ -416,8 +417,6 @@ sub pm_to_blib { use File::Path qw(mkpath); use File::Compare qw(compare); use AutoSplit; - # my $my_req = $self->catfile(qw(auto ExtUtils Install forceunlink.al)); - # require $my_req; # Hairy, but for the first if (!ref($fromto) && -r $fromto) { diff --git a/lib/ExtUtils/META.yml b/lib/ExtUtils/META.yml index 60a0ef4..c111e13 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.20 +version: 6.21 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.20 +generated_by: ExtUtils::MakeMaker version 6.21 diff --git a/lib/ExtUtils/MM_Any.pm b/lib/ExtUtils/MM_Any.pm index f03985b..3e1673c 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 :: \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 24348ac..ae94d5f 100644 --- a/lib/ExtUtils/MM_Unix.pm +++ b/lib/ExtUtils/MM_Unix.pm @@ -20,7 +20,7 @@ use vars qw($VERSION @ISA use ExtUtils::MakeMaker qw($Verbose neatvalue); -$VERSION = '1.44'; +$VERSION = '1.45'; require ExtUtils::MM_Any; @ISA = qw(ExtUtils::MM_Any); @@ -559,6 +559,73 @@ sub depend { join "", @m; } + +=item dir_target B + + my $make_frag = $mm->dir_target(@directories); + +I its use is no longer necessary and is I. blibdirs_target provides a much +simpler mechanism and pm_to_blib() can create its own directories anyway. + +Returns a Makefile entry for a .exists file in each of the @directories. +The purpose is to create a directory and provide a make target to depend on. +The make target is a .exists file in each of those directories. + +For example + + $mm->dir_target('$(INST_ARCHDIR)'); + +would return the make target C<$(INST_ARCHDIR)/.exists> which would +create $(INST_ARCHDIR) and touch .exists. You would depend on this target +to make sure $(INST_ARCHDIR) is created. + +Ignores directories which have already gone through dir_target() so you +might wind up getting nothing. + +=cut + +sub dir_target { + my($self, @dirs) = @_; + + my @targs = (); + my $make = ''; + foreach my $dir (@dirs) { + my $targ = $self->catfile($dir, '.exists'); + + my $targdir; + if ($Is_VMS) { # Just remove file name; dirspec is often in macro + ($targdir = $targ) =~ s:/?\.exists\z::; + } + else { # while elsewhere we expect to see the dir separator in $targ + $targdir = dirname($targ); + } + + next if $self->{DIR_TARGET}{$self}{$targdir}++; + + push @targs, $targ; + $make .= <init_DEST @@ -1083,9 +1150,9 @@ $(INST_DYNAMIC): $(OBJECT) $(MYEXTLIB) $(BOOTSTRAP) blibdirs $(EXPORT_LIST) $(PE # platforms. We peek at lddlflags to see if we need -Wl,-R # or -R to add paths to the run-time library search path. if ($Config{'lddlflags'} =~ /-Wl,-R/) { - $libs .= ' -L$(PERL_INC) -Wl,-R$(INSTALLARCHLIB)/CORE -lperl'; + $libs .= ' -L$(PERL_INC) -Wl,-R$(INSTALLARCHLIB)/CORE -Wl,-R$(PERL_ARCHLIB)/CORE -lperl'; } elsif ($Config{'lddlflags'} =~ /-R/) { - $libs .= ' -L$(PERL_INC) -R$(INSTALLARCHLIB)/CORE -lperl'; + $libs .= ' -L$(PERL_INC) -R$(INSTALLARCHLIB)/CORE -R$(PERL_ARCHLIB)/CORE -lperl'; } } @@ -3967,8 +4034,6 @@ config :: $(FIRST_MAKEFILE) blibdirs $(NOECHO) $(NOOP) '; - push @m, $self->blibdirs_target; - push @m, ' $(O_FILES): $(H_FILES) ' if @{$self->{O_FILES} || []} && @{$self->{H} || []}; diff --git a/lib/ExtUtils/MakeMaker.pm b/lib/ExtUtils/MakeMaker.pm index d1fe68b..3891215 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.20'; -($Revision) = q$Revision: 1.142 $ =~ /Revision:\s+(\S+)/; +$VERSION = '6.21'; +($Revision) = q$Revision: 1.144 $ =~ /Revision:\s+(\S+)/; require Exporter; use Config; @@ -262,7 +262,7 @@ sub full_setup { special_targets c_o xs_c xs_o - top_targets linkext dlsyms dynamic dynamic_bs + top_targets blibdirs linkext dlsyms dynamic dynamic_bs dynamic_lib static static_lib manifypods processPL installbin subdirs clean_subdirs clean realclean_subdirs realclean @@ -276,7 +276,7 @@ sub full_setup { @Overridable = @MM_Sections; push @Overridable, qw[ - blibdirs_target libscan makeaperl needs_linking perm_rw perm_rwx + libscan makeaperl needs_linking perm_rw perm_rwx subdir_x test_via_harness test_via_script init_PERL ]; @@ -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.142 $ =~ /(\d+)/g; + $VERSION = sprintf "%d.%03d", q$Revision: 1.144 $ =~ /(\d+)/g; $FOO::VERSION = '1.10'; *FOO::VERSION = \'1.11'; our $VERSION = 1.2.3; # new for perl5.6.0