lib/ExtUtils/t/MM_VMS.t See if ExtUtils::MM_VMS works
lib/ExtUtils/t/MM_Win32.t See if ExtUtils::MM_Win32 works
lib/ExtUtils/TODO Things TODO in MakeMaker
+lib/ExtUtils/t/dir_target.t Verify if dir_target() is supported
lib/ExtUtils/t/oneliner.t See if MM can generate perl one-liners
lib/ExtUtils/t/Packlist.t See if Packlist works
lib/ExtUtils/t/parse_version.t See if parse_version works
-6.22
+6.25 Wed Dec 15 06:59:46 EST 2004
+ - Build.PL was being considered like Module_pm.PL. Build.PL is now
+ ignored. [radek@karnet.pl] [rt.cpan.org 8809]
+ - Devel::Cover cover_db/ directory now ignored by MANIFEST.SKIP
+
+6.24_01 Thu Dec 9 00:44:48 EST 2004
+ - Docs encouraged possibly insecure use of /tmp [CAN-2004-0976 via Debian]
+ - Remove empty rpath from .so files [bleadperl@23183]
+ - At long last the core man page title has its apostrophe.
+ - BeOS tests fixed [Ingo Weinhold] [perlbug #32717]
+ - Putting a pm_to_blib target back (alias of pm_to_blib.ts) in case
+ anyone was depending on it being there (mod_perl was).
+
+6.24 Tue Nov 30 15:35:13 EST 2004
+ - dir_target() was accidentally named dir_targets() causing problems
+ installing some Tk modules.
+
+6.23 Fri Nov 26 16:01:50 EST 2004
+ - MM_MacOS lost its $VERSION causing some CPAN indexing problems. Enough
+ people noticed this to warrant a quick release.
+
+6.22 Tue Nov 23 22:22:22 EST 2004
+ - Minor glitch in Command.t test on Win32 [thanks Steve Hay]
+ * Fixed MANIFEST.SKIP so it avoids all the new *.ts files.
+ - Don't spuriously define pasthru arguments
+
+6.21_03 Sat Apr 3 2004
+ - pm_to_blib and blibdirs stamp files now pm_to_blib.ts and blibdirs.ts
+ everywhere because some filesystems insist you have a dot in the
+ filename. This eliminates a bunch of special case code.
- 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
+ * 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{}.
+ * 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]
[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]
+ - Fixed finding the default MANIFEST.SKIP if its on a different volume
+ [Ilya Zakharevich]
+ - When building Perl, we had a chance of picking up the old installed
+ xsubpp from @INC [Andreas Koenig]
+ - makeaperl() now a bit more intellegent about ignoring perl libraries
+ not called libperl. [Ilya Zakharevich bleadperl@22032]
+ * MacOS Classic (MacPerl) is no longer supported. Please use
+ Module::Build instead.
+ * Restored pm_to_blib.ts so pm_to_blib generation will be quiessent on
+ VMS. [rt 4675]
+ - For simplicity, dir_target() is now a no-op. Should not effect any
+ existing uses.
+ - Converted utility commands from using $(PERLRUN) to $(ABSPERLRUN).
+ This allows distclean to work with SDBM_File. [rt 5616]
+ - realclean was using "rm -f" instead of "rm -rf" meaning directories
+ wouldn't be properly cleaned. Caused by bleadperl@7952. [rt 5208]
+ - fixpath() could undo wraplist() on VMS [rt 4955]
+ - ensure ExtUtils::Command::rm_f deletes all versions of a file on VMS
+ [rt 4687]
+ - hint.t generating improperly named hint files on OS's where $^O
+ contains a '.'. They should be converted to underscores. Test
+ mistake, not a bug. [rt 5365]
+ - Fixed ExtUtils::Command::chmod() so it will work on directories on
+ VMS. [rt 4676]
+ - parse_version.t was using no_plan causing trouble on older T::Hs.
+ [rt 5633]
6.21 Tue Nov 11 00:12:56 PST 2003
- NetBSD was looking in INSTALLARCHLIB/CORE for libperl instead of
=cut
-sub rm_f
-{
- expand_wildcards();
- foreach (@ARGV)
- {
- next unless -f $_;
- next if unlink($_);
- chmod(0777,$_);
- next if unlink($_);
- carp "Cannot delete $_:$!";
- }
+sub rm_f {
+ expand_wildcards();
+
+ foreach my $file (@ARGV) {
+ next unless -f $file;
+
+ next if _unlink($file);
+
+ chmod(0777, $file);
+
+ next if _unlink($file);
+
+ carp "Cannot delete $file: $!";
+ }
}
+sub _unlink {
+ my $files_unlinked = 0;
+ foreach my $file (@_) {
+ my $delete_count = 0;
+ $delete_count++ while unlink $file;
+ $files_unlinked++ if $delete_count;
+ }
+ return $files_unlinked;
+}
+
+
=item touch files ...
Makes files exist, with current timestamp
local @ARGV = @ARGV;
my $mode = shift(@ARGV);
expand_wildcards();
+
+ if( $Is_VMS ) {
+ foreach my $idx (0..$#ARGV) {
+ my $path = $ARGV[$idx];
+ next unless -d $path;
+
+ # chmod 0777, [.foo.bar] doesn't work on VMS, you have to do
+ # chmod 0777, [.foo]bar.dir
+ my @dirs = File::Spec->splitdir( $path );
+ $dirs[-1] .= '.dir';
+ $path = File::Spec->catfile(@dirs);
+
+ $ARGV[$idx] = $path;
+ }
+ }
+
chmod(oct $mode,@ARGV) || die "Cannot chmod ".join(' ',$mode,@ARGV).":$!";
}
@EXPORT = qw(test_harness pod2man perllocal_install uninstall
warn_if_old_packlist);
-$VERSION = '0.03';
+$VERSION = '0.03_01';
my $Is_VMS = $^O eq 'VMS';
# Official sets --center, but don't override things explicitly set.
if ($options{official} && !defined $options{center}) {
- $options{center} = 'Perl Programmers Reference Guide';
+ $options{center} = q[Perl Programmer's Reference Guide];
}
# This isn't a valid Pod::Man option and is only accepted for backwards
use strict;
use vars qw($VERSION);
-$VERSION = 1.30_01;
+$VERSION = 1.30;
use Config;
use Cwd 'cwd';
\bMakefile$
\bblib/
\bMakeMaker-\d
-\bpm_to_blib$
-\bblibdirs\.exists$
+\bpm_to_blib\.ts$
+\bblibdirs\.ts$
# Avoid Module::Build generated and utility files.
\bBuild$
\.old$
\#$
\b\.#
+
+# Avoid Devel::Cover files.
+\bcover_db\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.22
+version: 6.25
version_from: lib/ExtUtils/MakeMaker.pm
installdirs: perl
requires:
Pod::Man: 0
distribution_type: module
-generated_by: ExtUtils::MakeMaker version 6.22
+generated_by: ExtUtils::MakeMaker version 6.25
}
my %Is = ();
-$Is{VMS} = 1 if $^O eq 'VMS';
-$Is{OS2} = 1 if $^O eq 'os2';
-$Is{MacOS} = 1 if $^O eq 'MacOS';
+$Is{VMS} = $^O eq 'VMS';
+$Is{OS2} = $^O eq 'os2';
+$Is{MacOS} = $^O eq 'MacOS';
if( $^O eq 'MSWin32' ) {
Win32::IsWin95() ? $Is{Win95} = 1 : $Is{Win32} = 1;
}
-$Is{UWIN} = 1 if $^O =~ /^uwin(-nt)?$/;
-$Is{Cygwin} = 1 if $^O eq 'cygwin';
-$Is{NW5} = 1 if $Config{osname} eq 'NetWare'; # intentional
-$Is{BeOS} = 1 if $^O =~ /beos/i; # XXX should this be that loose?
-$Is{DOS} = 1 if $^O eq 'dos';
-
-$Is{Unix} = 1 if !keys %Is;
-
+$Is{UWIN} = $^O =~ /^uwin(-nt)?$/;
+$Is{Cygwin} = $^O eq 'cygwin';
+$Is{NW5} = $Config{osname} eq 'NetWare'; # intentional
+$Is{BeOS} = $^O =~ /beos/i; # XXX should this be that loose?
+$Is{DOS} = $^O eq 'dos';
if( $Is{NW5} ) {
$^O = 'NetWare';
delete $Is{Win32};
}
+$Is{Unix} = !grep { $_ } values %Is;
+map { delete $Is{$_} unless $Is{$_} } keys %Is;
_assert( keys %Is == 1 );
my($OS) = keys %Is;
use strict;
use vars qw($VERSION @ISA);
-$VERSION = 0.09_01;
+$VERSION = '0.10';
@ISA = qw(File::Spec);
use Config;
return (grep { $flavors{$_} } @_) ? 1 : 0;
}
+
+=item dir_target B<DEPRECATED>
+
+ my $make_frag = $mm->dir_target(@directories);
+
+I<This function is deprecated> its use is no longer necessary and is
+I<only provided for backwards compatibility>. It is now a no-op.
+blibdirs_target provides a much simpler mechanism and pm_to_blib() can
+create its own directories anyway.
+
+=cut
+
+sub dir_target {}
+
+
=item blibdirs_target (o)
my $make_frag = $mm->blibdirs_target;
-Creates the blibdirs.exists target which creates all the directories we use in
+Creates the blibdirs.ts target which creates all the directories we use in
blib/.
=cut
sub blibdirs_target {
my $self = shift;
- my @dirs = map { uc "\$(INST_$_)" } qw(libdir
- autodir archautodir
- bin script
- man1dir man3dir
- );
+ my @dirs = map { uc "\$(INST_$_)" } qw(libdir archlib
+ autodir archautodir
+ bin script
+ man1dir man3dir
+ );
my @mkpath = $self->split_command('$(NOECHO) $(MKPATH)', @dirs);
my @chmod = $self->split_command('$(NOECHO) $(CHMOD) 755', @dirs);
- my $make = "\nblibdirs.exists :: Makefile.PL \n";
+ my $make = "\nblibdirs.ts :\n";
$make .= join "", map { "\t$_\n" } @mkpath, @chmod;
- $make .= "\t\$(NOECHO) \$(TOUCH) blibdirs.exists\n\n";
+ $make .= <<'MAKE';
+ $(NOECHO) $(TOUCH) $@
+
+MAKE
return $make;
}
corresponding to the MM_*.pm file we're using.
The first element of @os_flavor is the major family (ie. Unix,
-Windows, VMS, OS/2, MacOS, etc...) and the rest are sub families.
+Windows, VMS, OS/2, etc...) and the rest are sub families.
Some examples:
Windows NT ('Win32', 'WinNT')
Win98 ('Win32', 'Win9x')
Linux ('Unix', 'Linux')
- MacOS Classic ('MacOS', 'MacOS Classic')
MacOS X ('Unix', 'Darwin', 'MacOS', 'MacOS X')
OS/2 ('OS/2')
-# MM_MacOS.pm
-# MakeMaker default methods for MacOS
-# This package is inserted into @ISA of MakeMaker's MM before the
-# built-in ExtUtils::MM_Unix methods if MakeMaker.pm is run under MacOS.
-#
-# Author: Matthias Neeracher <neeracher@mac.com>
-# Maintainer: Chris Nandor <pudge@pobox.com>
-
package ExtUtils::MM_MacOS;
-require ExtUtils::MM_Any;
-require ExtUtils::MM_Unix;
-@ISA = qw( ExtUtils::MM_Any ExtUtils::MM_Unix );
-
-use vars qw($VERSION);
-$VERSION = '1.07';
-use Config;
-use Cwd 'cwd';
-require Exporter;
-use File::Basename;
-use vars qw(%make_data);
+$VERSION = 1.08;
-my $Mac_FS = eval { require Mac::FileSpec::Unixish };
-
-use ExtUtils::MakeMaker qw($Verbose &neatvalue);
+sub new {
+ die <<'UNSUPPORTED';
+MacOS Classic (MacPerl) is no longer supported by MakeMaker.
+Please use Module::Build instead.
+UNSUPPORTED
+}
=head1 NAME
-ExtUtils::MM_MacOS - methods to override UN*X behaviour in ExtUtils::MakeMaker
+ExtUtils::MM_MacOS - once produced Makefiles for MacOS Classic
=head1 SYNOPSIS
- use ExtUtils::MM_MacOS; # Done internally by ExtUtils::MakeMaker if needed
+ # MM_MacOS no longer contains any code. This is just a stub.
=head1 DESCRIPTION
-MM_MacOS currently only produces an approximation to the correct Makefile.
-
-=over 4
-
-=cut
-
-sub new {
- my($class,$self) = @_;
- my($key);
- my($cwd) = cwd();
-
- print STDOUT "Mac MakeMaker (v$ExtUtils::MakeMaker::VERSION)\n" if $Verbose;
- if (-f "MANIFEST" && ! -f "Makefile.mk"){
- ExtUtils::MakeMaker::check_manifest();
- }
-
- mkdir("Obj", 0777) unless -d "Obj";
-
- $self = {} unless defined $self;
-
- check_hints($self);
-
- my(%initial_att) = %$self; # record initial attributes
-
- if (defined $self->{CONFIGURE}) {
- if (ref $self->{CONFIGURE} eq 'CODE') {
- $self = { %$self, %{&{$self->{CONFIGURE}}}};
- } else {
- require Carp;
- Carp::croak("Attribute 'CONFIGURE' to WriteMakefile() not a code reference\n");
- }
- }
-
- my $newclass = ++$ExtUtils::MakeMaker::PACKNAME;
- local @ExtUtils::MakeMaker::Parent = @ExtUtils::MakeMaker::Parent; # Protect against non-local exits
- {
- no strict 'refs';
- print "Blessing Object into class [$newclass]\n" if $Verbose>=2;
- ExtUtils::MakeMaker::mv_all_methods("MY",$newclass);
- bless $self, $newclass;
- push @Parent, $self;
- require ExtUtils::MY;
- @{"$newclass\:\:ISA"} = 'MM';
- }
-
- $ExtUtils::MakeMaker::Recognized_Att_Keys{$_} = 1
- for map { $_ . 'Optimize' } qw(MWC MWCPPC MWC68K MPW MRC MRC SC);
-
- if (defined $ExtUtils::MakeMaker::Parent[-2]){
- $self->{PARENT} = $ExtUtils::MakeMaker::Parent[-2];
- my $key;
- for $key (@ExtUtils::MakeMaker::Prepend_parent) {
- next unless defined $self->{PARENT}{$key};
- $self->{$key} = $self->{PARENT}{$key};
- if ($key !~ /PERL$/) {
- $self->{$key} = $self->catdir("..",$self->{$key})
- unless $self->file_name_is_absolute($self->{$key});
- } else {
- # PERL or FULLPERL will be a command verb or even a
- # command with an argument instead of a full file
- # specification under VMS. So, don't turn the command
- # into a filespec, but do add a level to the path of
- # the argument if not already absolute.
- my @cmd = split /\s+/, $self->{$key};
- $cmd[1] = $self->catfile('[-]',$cmd[1])
- unless (@cmd < 2) || $self->file_name_is_absolute($cmd[1]);
- $self->{$key} = join(' ', @cmd);
- }
- }
- if ($self->{PARENT}) {
- $self->{PARENT}->{CHILDREN}->{$newclass} = $self;
- foreach my $opt (qw(POLLUTE PERL_CORE)) {
- if (exists $self->{PARENT}->{$opt}
- and not exists $self->{$opt})
- {
- # inherit, but only if already unspecified
- $self->{$opt} = $self->{PARENT}->{$opt};
- }
- }
- }
- my @fm = grep /^FIRST_MAKEFILE=/, @ARGV;
- $self->parse_args(@fm) if @fm;
- } else {
- $self->parse_args(split(' ', $ENV{PERL_MM_OPT} || ''),@ARGV);
- }
-
- $self->{NAME} ||= $self->guess_name;
-
- ($self->{NAME_SYM} = $self->{NAME}) =~ s/\W+/_/g;
-
- $self->init_main();
- $self->init_dirscan();
- $self->init_others();
-
- push @{$self->{RESULT}}, <<END;
-# This Makefile is for the $self->{NAME} extension to perl.
-#
-# It was generated automatically by MakeMaker version
-# $ExtUtils::MakeMaker::VERSION (Revision: $ExtUtils::MakeMaker::Revision) from the contents of
-# Makefile.PL. Don't edit this file, edit Makefile.PL instead.
-#
-# ANY CHANGES MADE HERE WILL BE LOST!
-#
-# MakeMaker Parameters:
-END
-
- foreach $key (sort keys %initial_att){
- my($v) = neatvalue($initial_att{$key});
- $v =~ s/(CODE|HASH|ARRAY|SCALAR)\([\dxa-f]+\)/$1\(...\)/;
- $v =~ tr/\n/ /s;
- push @{$self->{RESULT}}, "# $key => $v";
- }
-
- # turn the SKIP array into a SKIPHASH hash
- my (%skip,$skip);
- for $skip (@{$self->{SKIP} || []}) {
- $self->{SKIPHASH}{$skip} = 1;
- }
- delete $self->{SKIP}; # free memory
-
- # We skip many sections for MacOS, but we don't say anything about it in the Makefile
- for (qw/ const_config tool_autosplit
- tool_xsubpp tools_other dist macro depend post_constants
- pasthru c_o xs_c xs_o top_targets linkext
- dynamic_bs dynamic_lib static_lib manifypods
- installbin subdirs dist_basics dist_core
- distdir dist_test dist_ci install force perldepend makefile
- staticmake test pm_to_blib selfdocument
- const_loadlibs const_cccmd
- /)
- {
- $self->{SKIPHASH}{$_} = 2;
- }
- push @ExtUtils::MakeMaker::MM_Sections, "rulez"
- unless grep /rulez/, @ExtUtils::MakeMaker::MM_Sections;
-
- if ($self->{PARENT}) {
- for (qw/install dist dist_basics dist_core distdir dist_test dist_ci/) {
- $self->{SKIPHASH}{$_} = 1;
- }
- }
-
- # We run all the subdirectories now. They don't have much to query
- # from the parent, but the parent has to query them: if they need linking!
- unless ($self->{NORECURS}) {
- $self->eval_in_subdirs if @{$self->{DIR}};
- }
-
- my $section;
- foreach $section ( @ExtUtils::MakeMaker::MM_Sections ){
- next if defined $self->{SKIPHASH}{$section} &&
- $self->{SKIPHASH}{$section} == 2;
- print "Processing Makefile '$section' section\n" if ($Verbose >= 2);
- $self->{ABSTRACT_FROM} = macify($self->{ABSTRACT_FROM})
- if $self->{ABSTRACT_FROM};
- my($skipit) = $self->skipcheck($section);
- if ($skipit){
- push @{$self->{RESULT}}, "\n# --- MakeMaker $section section $skipit.";
- } else {
- my(%a) = %{$self->{$section} || {}};
- push @{$self->{RESULT}}, "\n# --- MakeMaker $section section:";
- push @{$self->{RESULT}}, "# " . join ", ", %a if $Verbose && %a;
- push @{$self->{RESULT}}, $self->nicetext($self->$section( %a ));
- }
- }
-
- push @{$self->{RESULT}}, "\n# End.";
- pop @Parent;
-
- $ExtUtils::MM_MacOS::make_data{$cwd} = $self;
- $self;
-}
-
-sub skipcheck {
- my($self) = shift;
- my($section) = @_;
- return 'skipped' if $self->{SKIPHASH}{$section};
- return '';
-}
-
-=item maybe_command
-
-Returns true, if the argument is likely to be a command.
-
-=cut
-
-sub maybe_command {
- my($self,$file) = @_;
- return $file if ! -d $file;
- return;
-}
-
-=item guess_name
-
-Guess the name of this package by examining the working directory's
-name. MakeMaker calls this only if the developer has not supplied a
-NAME attribute.
-
-=cut
-
-sub guess_name {
- my($self) = @_;
- my $name = cwd();
- $name =~ s/.*:// unless ($name =~ s/^.*:ext://);
- $name =~ s#:#::#g;
- $name =~ s#[\-_][\d.\-]+$##; # this is new with MM 5.00
- $name;
-}
-
-=item macify
-
-Translate relative Unix filepaths into Mac names.
-
-=cut
-
-sub macify {
- my($unix) = @_;
- my(@mac);
-
- foreach (split(/[ \t\n]+/, $unix)) {
- if (m|/|) {
- if ($Mac_FS) { # should always be true
- $_ = Mac::FileSpec::Unixish::nativize($_);
- } else {
- s|^\./||;
- s|/|:|g;
- $_ = ":$_";
- }
- }
- push(@mac, $_);
- }
-
- return "@mac";
-}
-
-=item patternify
-
-Translate Unix filepaths and shell globs to Mac style.
-
-=cut
-
-sub patternify {
- my($unix) = @_;
- my(@mac);
- use ExtUtils::MakeMaker::bytes; # Non-UTF-8 high bytes below.
-
- foreach (split(/[ \t\n]+/, $unix)) {
- if (m|/|) {
- $_ = ":$_";
- s|/|:|g;
- s|\*|Ã…|g;
- $_ = "'$_'" if /[?Ã…]/;
- push(@mac, $_);
- }
- }
-
- return "@mac";
-}
-
-=item init_main
-
-Initializes some of NAME, FULLEXT, BASEEXT, DLBASE, PERL_SRC,
-PERL_LIB, PERL_ARCHLIB, PERL_INC, INSTALLDIRS, INST_*, INSTALL*,
-PREFIX, CONFIG, AR, AR_STATIC_ARGS, LD, OBJ_EXT, LIB_EXT, MAP_TARGET,
-LIBPERL_A, VERSION_FROM, VERSION, DISTNAME, VERSION_SYM.
-
-=cut
-
-sub init_main {
- my($self) = @_;
-
- # --- Initialize Module Name and Paths
-
- # NAME = The perl module name for this extension (eg DBD::Oracle).
- # FULLEXT = Pathname for extension directory (eg DBD/Oracle).
- # BASEEXT = Basename part of FULLEXT. May be just equal FULLEXT.
- ($self->{FULLEXT} =
- $self->{NAME}) =~ s!::!:!g ; #eg. BSD:Foo:Socket
- ($self->{BASEEXT} =
- $self->{NAME}) =~ s!.*::!! ; #eg. Socket
-
- # --- Initialize PERL_LIB, INST_LIB, PERL_SRC
-
- # *Real* information: where did we get these two from? ...
- my $inc_config_dir = dirname($INC{'Config.pm'});
- my $inc_carp_dir = dirname($INC{'Carp.pm'});
-
- unless ($self->{PERL_SRC}){
- my($dir);
- foreach $dir (qw(:: ::: :::: ::::: ::::::)){
- if (-f "${dir}perl.h") {
- $self->{PERL_SRC}=$dir ;
- last;
- }
- }
- if (!$self->{PERL_SRC} && -f "$ENV{MACPERL}CORE:perl:perl.h") {
- # Mac pathnames may be very nasty, so we'll install symlinks
- unlink(":PerlCore", ":PerlLib");
- symlink("$ENV{MACPERL}CORE:", "PerlCore");
- symlink("$ENV{MACPERL}lib:", "PerlLib");
- $self->{PERL_SRC} = ":PerlCore:perl:" ;
- $self->{PERL_LIB} = ":PerlLib:";
- }
- }
- if ($self->{PERL_SRC}){
- $self->{PERL_LIB} ||= $self->catdir("$self->{PERL_SRC}","lib");
- $self->{PERL_ARCHLIB} = $self->{PERL_LIB};
- $self->{PERL_INC} = $self->{PERL_SRC};
- } else {
-# hmmmmmmm ... ?
- $self->{PERL_LIB} ||= "$ENV{MACPERL}site_perl";
- $self->{PERL_ARCHLIB} = $self->{PERL_LIB};
- $self->{PERL_INC} = $ENV{MACPERL};
- $self->{PERL_SRC} = '';
- }
-
- $self->{INSTALLDIRS} = "perl";
- $self->{INST_LIB} = $self->{INST_ARCHLIB} = $self->{PERL_LIB};
- $self->{INST_MAN1DIR} = $self->{INSTALLMAN1DIR} = "none";
- $self->{MAN1EXT} ||= $Config::Config{man1ext};
- $self->{INST_MAN3DIR} = $self->{INSTALLMAN3DIR} = "none";
- $self->{MAN3EXT} ||= $Config::Config{man3ext};
- $self->{MAP_TARGET} ||= "perl";
-
- # make a simple check if we find Exporter
- # hm ... do we really care? at all?
-# warn "Warning: PERL_LIB ($self->{PERL_LIB}) seems not to be a perl library directory
-# (Exporter.pm not found)"
-# unless -f $self->catfile("$self->{PERL_LIB}","Exporter.pm") ||
-# $self->{NAME} eq "ExtUtils::MakeMaker";
-
- # Determine VERSION and VERSION_FROM
- ($self->{DISTNAME}=$self->{NAME}) =~ s#(::)#-#g unless $self->{DISTNAME};
- if ($self->{VERSION_FROM}){
- # XXX replace with parse_version() override
- local *FH;
- open(FH,macify($self->{VERSION_FROM})) or
- die "Could not open '$self->{VERSION_FROM}' (attribute VERSION_FROM): $!";
- while (<FH>) {
- chop;
- next unless /\$([\w:]*\bVERSION)\b.*=/;
- local $ExtUtils::MakeMaker::module_version_variable = $1;
- my($eval) = "$_;";
- eval $eval;
- die "Could not eval '$eval': $@" if $@;
- if ($self->{VERSION} = $ {$ExtUtils::MakeMaker::module_version_variable}){
- print "$self->{NAME} VERSION is $self->{VERSION} (from $self->{VERSION_FROM})\n" if $Verbose;
- } else {
- # XXX this should probably croak
- print "WARNING: Setting VERSION via file '$self->{VERSION_FROM}' failed\n";
- }
- last;
- }
- close FH;
- }
-
- if ($self->{VERSION}) {
- $self->{VERSION} =~ s/^\s+//;
- $self->{VERSION} =~ s/\s+$//;
- }
-
- $self->{VERSION} = "0.10" unless $self->{VERSION};
- ($self->{VERSION_SYM} = $self->{VERSION}) =~ s/\W/_/g;
-
-
- # Graham Barr and Paul Marquess had some ideas how to ensure
- # version compatibility between the *.pm file and the
- # corresponding *.xs file. The bottomline was, that we need an
- # XS_VERSION macro that defaults to VERSION:
- $self->{XS_VERSION} ||= $self->{VERSION};
-
-
- $self->{DEFINE} .= " \$(XS_DEFINE_VERSION) \$(DEFINE_VERSION)";
-
- # Preprocessor definitions may be useful
- $self->{DEFINE} =~ s/-D/-d /g;
-
- # UN*X includes probably are not useful
- $self->{DEFINE} =~ s/-I\S+/_include($1)/eg;
-
-
- if ($self->{INC}) {
- # UN*X includes probably are not useful
- $self->{INC} =~ s/-I(\S+)/_include($1)/eg;
- }
-
-
- # --- Initialize Perl Binary Locations
-
- # Find Perl 5. The only contract here is that both 'PERL' and 'FULLPERL'
- # will be working versions of perl 5. miniperl has priority over perl
- # for PERL to ensure that $(PERL) is usable while building ./ext/*
- my ($component,@defpath);
- foreach $component ($self->{PERL_SRC}, $self->path(), $Config::Config{binexp}) {
- push @defpath, $component if defined $component;
- }
- $self->{PERL} = "$self->{PERL_SRC}miniperl";
-}
-
-=item init_others
-
-Initializes LDLOADLIBS, LIBS
-
-=cut
-
-sub init_others { # --- Initialize Other Attributes
- my($self) = shift;
-
- if ( !$self->{OBJECT} ) {
- # init_dirscan should have found out, if we have C files
- $self->{OBJECT} = "";
- $self->{OBJECT} = "$self->{BASEEXT}.c" if @{$self->{C}||[]};
- } else {
- $self->{OBJECT} =~ s/\$\(O_FILES\)/@{$self->{C}||[]}/;
- }
- my($src);
- foreach (split(/[ \t\n]+/, $self->{OBJECT})) {
- if (/^$self->{BASEEXT}\.o(bj)?$/) {
- $src .= " $self->{BASEEXT}.c";
- } elsif (/^(.*\..*)\.o$/) {
- $src .= " $1";
- } elsif (/^(.*)(\.o(bj)?|\$\(OBJ_EXT\))$/) {
- if (-f "$1.cp") {
- $src .= " $1.cp";
- } else {
- $src .= " $1.c";
- }
- } else {
- $src .= " $_";
- }
- }
- $self->{SOURCE} = $src;
- $self->{FULLPERL} = "$self->{PERL_SRC}perl";
- $self->{MAKEFILE} = "Makefile.mk";
- $self->{FIRST_MAKEFILE} = $self->{MAKEFILE};
- $self->{MAKEFILE_OLD} = $self->{MAKEFILE}.'.old';
-
- $self->{'DEV_NULL'} ||= ' \xB3 Dev:Null';
-
- return 1;
-}
-
-=item init_platform
-
-Add MACPERL_SRC MACPERL_LIB
-
-=item platform_constants
-
-Add MACPERL_SRC MACPERL_LIB MACLIBS_68K MACLIBS_PPC MACLIBS_SC MACLIBS_MRC
-MACLIBS_ALL_68K MACLIBS_ALL_PPC MACLIBS_SHARED
-
-XXX Few are initialized. How many of these are ever used?
-
-=cut
-
-sub init_platform {
- my $self = shift;
-
- $self->{MACPERL_SRC} = $self->catdir("$self->{PERL_SRC}","macos:");
- $self->{MACPERL_LIB} ||= $self->catdir("$self->{MACPERL_SRC}","lib");
- $self->{MACPERL_INC} = $self->{MACPERL_SRC};
-}
-
-
-
-sub platform_constants {
- my $self = shift;
-
- foreach my $macro (qw(MACPERL_SRC MACPERL_LIB MACLIBS_68K MACLIBS_PPC
- MACLIBS_SC MACLIBS_MRC MACLIBS_ALL_68K
- MACLIBS_ALL_PPC MACLIBS_SHARED))
- {
- next unless defined $self->{$macro};
- $make_frag .= "$macro = $self->{$macro}\n";
- }
-
- return $make_frag;
-}
-
-
-=item init_dirscan
-
-Initializes DIR, XS, PM, C, O_FILES, H, PL_FILES, MAN*PODS, EXE_FILES.
-
-=cut
-
-sub init_dirscan { # --- File and Directory Lists (.xs .pm .pod etc)
- my($self) = @_;
- my($name, %dir, %xs, %c, %h, %ignore, %pl_files, %manifypods);
- local(%pm); #the sub in find() has to see this hash
-
- # in case we don't find it below!
- if ($self->{VERSION_FROM}) {
- my $version_from = macify($self->{VERSION_FROM});
- $pm{$version_from} = $self->catfile('$(INST_LIBDIR)',
- $version_from);
- }
-
- $ignore{'test.pl'} = 1;
- foreach $name ($self->lsdir(":")){
- next if ($name =~ /^\./ or $ignore{$name});
- next unless $self->libscan($name);
- if (-d $name){
- next if $self->{NORECURS};
- $dir{$name} = $name if (-f ":$name:Makefile.PL");
- } elsif ($name =~ /\.xs$/){
- my($c); ($c = $name) =~ s/\.xs$/.c/;
- $xs{$name} = $c;
- $c{$c} = 1;
- } elsif ($name =~ /\.c(p|pp|xx|c)?$/i){ # .c .C .cpp .cxx .cc .cp
- $c{$name} = 1
- unless $name =~ m/perlmain\.c/; # See MAP_TARGET
- } elsif ($name =~ /\.h$/i){
- $h{$name} = 1;
- } elsif ($name =~ /\.(p[ml]|pod)$/){
- $pm{$name} = $self->catfile('$(INST_LIBDIR)',$name);
- } elsif ($name =~ /\.PL$/ && $name ne "Makefile.PL") {
- ($pl_files{$name} = $name) =~ s/\.PL$// ;
- }
- }
-
- # Some larger extensions often wish to install a number of *.pm/pl
- # files into the library in various locations.
-
- # The attribute PMLIBDIRS holds an array reference which lists
- # subdirectories which we should search for library files to
- # install. PMLIBDIRS defaults to [ 'lib', $self->{BASEEXT} ]. We
- # recursively search through the named directories (skipping any
- # which don't exist or contain Makefile.PL files).
-
- # For each *.pm or *.pl file found $self->libscan() is called with
- # the default installation path in $_[1]. The return value of
- # libscan defines the actual installation location. The default
- # libscan function simply returns the path. The file is skipped
- # if libscan returns false.
-
- # The default installation location passed to libscan in $_[1] is:
- #
- # ./*.pm => $(INST_LIBDIR)/*.pm
- # ./xyz/... => $(INST_LIBDIR)/xyz/...
- # ./lib/... => $(INST_LIB)/...
- #
- # In this way the 'lib' directory is seen as the root of the actual
- # perl library whereas the others are relative to INST_LIBDIR
- # This is a subtle distinction but one that's important for nested
- # modules.
-
- $self->{PMLIBDIRS} = ['lib', $self->{BASEEXT}]
- unless $self->{PMLIBDIRS};
+Once upon a time, MakeMaker could produce an approximation of a correct
+Makefile on MacOS Classic (MacPerl). Due to a lack of maintainers, this
+fell out of sync with the rest of MakeMaker and hadn't worked in years.
+Since there's little chance of it being repaired, MacOS Classic is fading
+away, and the code was icky to begin with, the code has been deleted to
+make maintenance easier.
- #only existing directories that aren't in $dir are allowed
-
- my (@pmlibdirs) = map { macify ($_) } @{$self->{PMLIBDIRS}};
- my ($pmlibdir);
- @{$self->{PMLIBDIRS}} = ();
- foreach $pmlibdir (@pmlibdirs) {
- -d $pmlibdir && !$dir{$pmlibdir} && push @{$self->{PMLIBDIRS}}, $pmlibdir;
- }
-
- if (@{$self->{PMLIBDIRS}}){
- print "Searching PMLIBDIRS: @{$self->{PMLIBDIRS}}\n"
- if ($Verbose >= 2);
- require File::Find;
- File::Find::find(sub {
- if (-d $_){
- unless ($self->libscan($_)){
- $File::Find::prune = 1;
- }
- return;
- }
- my($path, $prefix) = ($File::Find::name, '$(INST_LIBDIR)');
- my($striplibpath,$striplibname);
- $prefix = '$(INST_LIB)' if (($striplibpath = $path) =~ s:^(\W*)lib\W:$1:);
- ($striplibname,$striplibpath) = fileparse($striplibpath);
- my($inst) = $self->catfile($prefix,$striplibpath,$striplibname);
- local($_) = $inst; # for backwards compatibility
- $inst = $self->libscan($inst);
- print "libscan($path) => '$inst'\n" if ($Verbose >= 2);
- return unless $inst;
- $pm{$path} = $inst;
- }, @{$self->{PMLIBDIRS}});
- }
-
- $self->{DIR} = [sort keys %dir] unless $self->{DIR};
- $self->{XS} = \%xs unless $self->{XS};
- $self->{PM} = \%pm unless $self->{PM};
- $self->{C} = [sort keys %c] unless $self->{C};
- $self->{H} = [sort keys %h] unless $self->{H};
- $self->{PL_FILES} = \%pl_files unless $self->{PL_FILES};
-
- # Set up names of manual pages to generate from pods
- unless ($self->{MAN1PODS}) {
- $self->{MAN1PODS} = {};
- }
- unless ($self->{MAN3PODS}) {
- $self->{MAN3PODS} = {};
- }
-}
-
-
-=item init_VERSION (o)
-
-Change DEFINE_VERSION and XS_DEFINE_VERSION
-
-=cut
-
-sub init_VERSION {
- my $self = shift;
-
- $self->SUPER::init_VERSION;
-
- $self->{DEFINE_VERSION} = '-d $(VERSION_MACRO)="¶"$(VERSION)¶""';
- $self->{XS_DEFINE_VERSION} = '-d $(XS_VERSION_MACRO)="¶"$(XS_VERSION)¶""';
-}
-
-
-=item special_targets (o)
-
-Add .INCLUDE
-
-=cut
-
-sub special_targets {
- my $self = shift;
-
- my $make_frag = $self->SUPER::special_targets;
-
- return $make_frag . <<'MAKE_FRAG';
-.INCLUDE : $(MACPERL_SRC)BuildRules.mk $(MACPERL_SRC)ExtBuildRules.mk
-
-MAKE_FRAG
-
-}
-
-=item static (o)
-
-Defines the static target.
-
-=cut
-
-sub static {
-# --- Static Loading Sections ---
-
- my($self) = shift;
- my($extlib) = $self->{MYEXTLIB} ? "\nstatic :: myextlib\n" : "";
- '
-all :: static
-
-install :: do_install_static
-
-install_static :: do_install_static
-' . $extlib;
-}
-
-=item dlsyms (o)
-
-Used by MacOS to define DL_FUNCS and DL_VARS and write the *.exp
-files.
-
-=cut
-
-sub dlsyms {
- my($self,%attribs) = @_;
-
- return '' unless !$self->{SKIPHASH}{'dynamic'};
-
- my($funcs) = $attribs{DL_FUNCS} || $self->{DL_FUNCS} || {};
- my($vars) = $attribs{DL_VARS} || $self->{DL_VARS} || [];
- my(@m);
-
- push(@m,"
-dynamic :: $self->{BASEEXT}.exp
-
-") unless $self->{SKIPHASH}{'dynamic'};
-
- my($extlib) = $self->{MYEXTLIB} ? " myextlib" : "";
-
- push(@m,"
-$self->{BASEEXT}.exp: Makefile.PL$extlib
-", qq[\t\$(PERL) "-I\$(PERL_LIB)" -e 'use ExtUtils::Mksymlists; ],
- 'Mksymlists("NAME" => "',$self->{NAME},'", "DL_FUNCS" => ',
- neatvalue($funcs),', "DL_VARS" => ', neatvalue($vars), ');\'
-');
-
- join('',@m);
-}
-
-=item dynamic (o)
-
-Defines the dynamic target.
-
-=cut
-
-sub dynamic {
-# --- dynamic Loading Sections ---
-
- my($self) = shift;
- '
-all :: dynamic
-
-install :: do_install_dynamic
-
-install_dynamic :: do_install_dynamic
-';
-}
-
-
-=item clean (o)
-
-Defines the clean target.
-
-=cut
-
-sub clean {
-# --- Cleanup and Distribution Sections ---
-
- my($self, %attribs) = @_;
- my(@m,$dir);
- push(@m, '
-# Delete temporary files but do not touch installed files. We don\'t delete
-# the Makefile here so a later make realclean still has a makefile to use.
-
-clean :: clean_subdirs
-');
-
- my(@otherfiles) = values %{$self->{XS}}; # .c files from *.xs files
- push(@otherfiles, patternify($attribs{FILES})) if $attribs{FILES};
- push @m, "\t\$(RM_RF) @otherfiles\n";
- # See realclean and ext/utils/make_ext for usage of Makefile.old
- push(@m,
- "\t\$(MV) \$(FIRST_MAKEFILE) \$(MAKEFILE_OLD)\n");
- push(@m,
- "\t$attribs{POSTOP}\n") if $attribs{POSTOP};
- join("", @m);
-}
-
-=item clean_subdirs_target
-
-MacOS semantics for changing directories and checking for existence
-very different than everyone else.
-
-=cut
-
-sub clean_subdirs_target {
- my($self) = shift;
-
- # No subdirectories, no cleaning.
- return <<'NOOP_FRAG' unless @{$self->{DIR}};
-clean_subdirs :
- $(NOECHO)$(NOOP)
-NOOP_FRAG
-
-
- my $clean = "clean_subdirs :\n";
-
- for my $dir (@{$self->{DIR}}) {
- $clean .= sprintf <<'MAKE_FRAG', $dir;
- Set OldEcho {Echo}
- Set Echo 0
- Directory %s
- If "`Exists -f $(FIRST_MAKEFILE)`" != ""
- $(MAKE) clean
- End
- Set Echo {OldEcho}
-
-MAKE_FRAG
- }
-
- return $clean;
-}
-
-
-=item realclean (o)
-
-Defines the realclean target.
-
-=cut
-
-sub realclean {
- my($self, %attribs) = @_;
- my(@m);
- push(@m,'
-# Delete temporary files (via clean) and also delete installed files
-realclean purge :: clean
-');
-
- my(@otherfiles) = ('$(FIRST_MAKEFILE)', '$(MAKEFILE_OLD)'); # Makefiles last
- push(@otherfiles, patternify($attribs{FILES})) if $attribs{FILES};
- push(@m, "\t\$(RM_RF) @otherfiles\n") if @otherfiles;
- push(@m, "\t$attribs{POSTOP}\n") if $attribs{POSTOP};
- join("", @m);
-}
-
-
-=item realclean_subdirs_target
-
-MacOS semantics for changing directories and checking for existence
-very different than everyone else.
-
-=cut
-
-sub realclean_subdirs_target {
- my $self = shift;
-
- return <<'NOOP_FRAG' unless @{$self->{DIR}};
-realclean_subdirs :
- $(NOECHO)$(NOOP)
-NOOP_FRAG
-
- my $rclean = "realclean_subdirs :\n";
-
- foreach my $dir (@{$self->{DIR}}){
- $rclean .= sprintf <<'RCLEAN', $dir,
- Set OldEcho \{Echo\}
- Set Echo 0
- Directory %s
- If \"\`Exists -f $(FIRST_MAKEFILE)\`\" != \"\"
- \$(MAKE) realclean
- End
- Set Echo \{OldEcho\}
-
-RCLEAN
-
- }
-
- return $rclean;
-}
-
-
-=item rulez (o)
-
-=cut
-
-sub rulez {
- my($self) = shift;
- qq'
-install install_static install_dynamic ::
-\t\$(MACPERL_SRC)PerlInstall -l \$(PERL_LIB)
-
-.INCLUDE : \$(MACPERL_SRC)BulkBuildRules.mk
-';
-}
-
-
-=item processPL (o)
-
-Defines targets to run *.PL files.
-
-=cut
-
-sub processPL {
- my($self) = shift;
- return "" unless $self->{PL_FILES};
- my(@m, $plfile);
- foreach $plfile (sort keys %{$self->{PL_FILES}}) {
- my $list = ref($self->{PL_FILES}->{$plfile})
- ? $self->{PL_FILES}->{$plfile}
- : [$self->{PL_FILES}->{$plfile}];
- foreach $target (@$list) {
- push @m, "
-ProcessPL :: $target
-\t$(NOECHO)\$(NOOP)
-
-$target :: $plfile
-\t\$(PERL) -I\$(MACPERL_LIB) -I\$(PERL_LIB) $plfile $target
-";
- }
- }
- join "", @m;
-}
-
-sub cflags {
- my($self,$libperl) = @_;
- my $optimize = '';
-
- for (map { $_ . "Optimize" } qw(MWC MWCPPC MWC68K MPW MRC MRC SC)) {
- $optimize .= "$_ = $self->{$_}" if exists $self->{$_};
- }
-
- return $self->{CFLAGS} = $optimize;
-}
-
-
-sub _include { # for Unix-style includes, with -I instead of -i
- my($inc) = @_;
- require File::Spec::Unix;
-
- # allow only relative paths
- if (File::Spec::Unix->file_name_is_absolute($inc)) {
- return '';
- } else {
- return '-i ' . macify($inc);
- }
-}
-
-=item os_flavor
-
-MacOS Classic is MacOS and MacOS Classic.
-
-=cut
-
-sub os_flavor {
- return('MacOS', 'MacOS Classic');
-}
+Those interested in writing modules for MacPerl should use Module::Build
+which works better than MakeMaker ever did.
-=back
+Anyone interested in resurrecting this file should pull the old version
+from the MakeMaker CVS repository and contact makemaker@perl.org, but we
+really encourage you to work on Module::Build instead.
=cut
use File::Basename;
use vars qw(@ISA $VERSION);
-$VERSION = '2.07_02';
+$VERSION = '2.07';
require ExtUtils::MM_Win32;
@ISA = qw(ExtUtils::MM_Win32);
return '' unless $self->has_link_code;
my $m = <<'END';
-$(INST_STATIC): $(OBJECT) $(MYEXTLIB) blibdirs.exists
+$(INST_STATIC): $(OBJECT) $(MYEXTLIB) blibdirs.ts
$(RM_RF) $@
END
use DirHandle;
use vars qw($VERSION @ISA
- $Is_Mac $Is_OS2 $Is_VMS $Is_Win32 $Is_Win95 $Is_Dos $Is_VOS
+ $Is_OS2 $Is_VMS $Is_Win32 $Is_Win95 $Is_Dos $Is_VOS
$Is_QNX $Is_AIX $Is_OSF $Is_IRIX $Is_NetBSD $Is_BSD
$Is_SunOS4 $Is_Solaris $Is_SunOS
- $Verbose %pm %static
+ $Verbose %pm
%Config_Override
);
use ExtUtils::MakeMaker qw($Verbose neatvalue);
-$VERSION = '1.45_02';
+$VERSION = '1.46';
require ExtUtils::MM_Any;
@ISA = qw(ExtUtils::MM_Any);
$Is_OS2 = $^O eq 'os2';
-$Is_Mac = $^O eq 'MacOS';
$Is_Win32 = $^O eq 'MSWin32' || $Config{osname} eq 'NetWare';
$Is_Win95 = $Is_Win32 && Win32::IsWin95();
$Is_Dos = $^O eq 'dos';
$(INST_ARCHAUTODIR)/extralibs.all
$(INST_ARCHAUTODIR)/extralibs.ld
perlmain.c tmon.out mon.out so_locations
- blibdirs.exists pm_to_blib
+ blibdirs.ts pm_to_blib.ts
*$(OBJ_EXT) *$(LIB_EXT) perl.exe perl perl$(EXE_EXT)
$(BOOTSTRAP) $(BASEEXT).bso
$(BASEEXT).def lib$(BASEEXT).def
}
-=item dir_target B<DEPRECATED>
-
- my $make_frag = $mm->dir_target(@directories);
-
-I<This function is deprecated> its use is no longer necessary and is I<only
-provided for backwards compatibility>. 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 .= <<MAKE_FRAG;
-$targ ::
- \$(NOECHO) \$(MKPATH) $targdir
- \$(NOECHO) \$(TOUCH) $targ
- \$(NOECHO) \$(CHMOD) \$(PERM_RWX) $targdir
-
-MAKE_FRAG
-
- }
-
- # So these new .exists targets get called along with blibdirs.exists.
- my $blib_addition = '';
- $blib_addition = <<MAKE_FRAG if @targs;
-blibdirs.exists :: @targs
- \$(NOECHO) \$(NOOP)
-
-MAKE_FRAG
-
- return $blib_addition . $make;
-}
-
-
=item init_DEST
$mm->init_DEST
# As Mkbootstrap might not write a file (if none is required)
# we use touch to prevent make continually trying to remake it.
# The DynaLoader only reads a non-empty file.
-$(BOOTSTRAP): $(FIRST_MAKEFILE) $(BOOTDEP) blibdirs.exists
+$(BOOTSTRAP): $(FIRST_MAKEFILE) $(BOOTDEP) blibdirs.ts
$(NOECHO) $(ECHO) "Running Mkbootstrap for $(NAME) ($(BSLOADLIBS))"
$(NOECHO) $(PERLRUN) \
"-MExtUtils::Mkbootstrap" \
-e "Mkbootstrap('$(BASEEXT)','$(BSLOADLIBS)');"
- $(NOECHO) $(TOUCH) $(BOOTSTRAP)
+ $(NOECHO) $(TOUCH) $@
$(CHMOD) $(PERM_RW) $@
-$(INST_BOOT): $(BOOTSTRAP) blibdirs.exists
- $(NOECHO) $(RM_RF) $(INST_BOOT)
- -$(CP) $(BOOTSTRAP) $(INST_BOOT)
+$(INST_BOOT): $(BOOTSTRAP) blibdirs.ts
+ $(NOECHO) $(RM_RF) $@
+ -$(CP) $(BOOTSTRAP) $@
$(CHMOD) $(PERM_RW) $@
MAKE_FRAG
}
INST_DYNAMIC_DEP = '.$inst_dynamic_dep.'
INST_DYNAMIC_FIX = '.$ld_fix.'
-$(INST_DYNAMIC): $(OBJECT) $(MYEXTLIB) $(BOOTSTRAP) blibdirs.exists $(EXPORT_LIST) $(PERL_ARCHIVE) $(PERL_ARCHIVE_AFTER) $(INST_DYNAMIC_DEP)
+$(INST_DYNAMIC): $(OBJECT) $(MYEXTLIB) $(BOOTSTRAP) blibdirs.ts $(EXPORT_LIST) $(PERL_ARCHIVE) $(PERL_ARCHIVE_AFTER) $(INST_DYNAMIC_DEP)
');
if ($armaybe ne ':'){
$ldfrom = 'tmp$(LIB_EXT)';
if ($self->{LD_RUN_PATH} ne "") {
$ld_run_path_shell = 'LD_RUN_PATH="$(LD_RUN_PATH)" ';
}
- push(@m,
-' '.$ld_run_path_shell.'$(LD) '.$ldrun.' $(LDDLFLAGS) '.$ldfrom.
-' $(OTHERLDFLAGS) -o $@ $(MYEXTLIB) $(PERL_ARCHIVE) '.$libs.' $(PERL_ARCHIVE_AFTER) $(EXPORT_LIST) $(INST_DYNAMIC_FIX)');
- push @m, '
+
+ push @m, sprintf <<'MAKE', $ld_run_path_shell, $ldrun, $ldfrom, $libs;
+ %s$(LD) %s $(LDDLFLAGS) %s $(OTHERLDFLAGS) -o $@ $(MYEXTLIB) \
+ $(PERL_ARCHIVE) %s $(PERL_ARCHIVE_AFTER) $(EXPORT_LIST) \
+ $(INST_DYNAMIC_FIX)
+MAKE
+
+ push @m, <<'MAKE';
$(CHMOD) $(PERM_RWX) $@
-';
+MAKE
- join('',@m);
+ return join('',@m);
}
=item exescan
sub init_dirscan { # --- File and Directory Lists (.xs .pm .pod etc)
my($self) = @_;
- my($name, %dir, %xs, %c, %h, %ignore, %pl_files, %manifypods);
+ my($name, %dir, %xs, %c, %h, %pl_files, %manifypods);
my %pm;
- @ignore{qw(Makefile.PL test.pl t)} = (1,1,1);
+ my %ignore = map {( $_ => 1 )} qw(Makefile.PL Build.PL test.pl t);
# ignore the distdir
$Is_VMS ? $ignore{"$self->{DISTVNAME}.dir"} = 1
&&
-s $self->catfile($self->{PERL_SRC},'perlshr_attr.opt')
or
- $Is_Mac
- or
$Is_Win32
){
warn qq{
$self->{CP} ||= "cp";
$self->{MV} ||= "mv";
$self->{CHMOD} ||= "chmod";
- $self->{MKPATH} ||= '$(PERLRUN) "-MExtUtils::Command" -e mkpath';
+ $self->{MKPATH} ||= '$(ABSPERLRUN) "-MExtUtils::Command" -e mkpath';
$self->{EQUALIZE_TIMESTAMP} ||=
- '$(PERLRUN) "-MExtUtils::Command" -e eqtime';
+ '$(ABSPERLRUN) "-MExtUtils::Command" -e eqtime';
$self->{UNINST} ||= 0;
$self->{VERBINST} ||= 0;
install({@ARGV}, '$(VERBINST)', 0, '$(UNINST)');
CODE
$self->{DOC_INSTALL} ||=
- '$(PERLRUN) "-MExtUtils::Command::MM" -e perllocal_install';
+ '$(ABSPERLRUN) "-MExtUtils::Command::MM" -e perllocal_install';
$self->{UNINSTALL} ||=
- '$(PERLRUN) "-MExtUtils::Command::MM" -e uninstall';
+ '$(ABSPERLRUN) "-MExtUtils::Command::MM" -e uninstall';
$self->{WARN_IF_OLD_PACKLIST} ||=
- '$(PERLRUN) "-MExtUtils::Command::MM" -e warn_if_old_packlist';
+ '$(ABSPERLRUN) "-MExtUtils::Command::MM" -e warn_if_old_packlist';
$self->{UMASK_NULL} ||= "umask 0";
$self->{DEV_NULL} ||= "> /dev/null 2>&1";
last unless defined $from;
my $todir = dirname($to);
push @m, "
-$to : $from \$(FIRST_MAKEFILE) blibdirs.exists
+$to : $from \$(FIRST_MAKEFILE) blibdirs.ts
\$(NOECHO) \$(RM_F) $to
\$(CP) $from $to
\$(FIXIN) $to
$linkcmd =~ s,(perl\.exp),\$(PERL_INC)/$1,;
# Which *.a files could we make use of...
- local(%static);
+ my %static;
require File::Find;
File::Find::find(sub {
return unless m/\Q$self->{LIB_EXT}\E$/;
- return if m/^libperl/ or m/^perl\Q$self->{LIB_EXT}\E$/;
- # Skip purified versions of libraries (e.g., DynaLoader_pure_p1_c0_032.a)
+
+ # Skip perl's libraries.
+ return if m/^libperl/ or m/^perl\Q$self->{LIB_EXT}\E$/;
+
+ # Skip purified versions of libraries
+ # (e.g., DynaLoader_pure_p1_c0_032.a)
return if m/_pure_\w+_\w+_\w+\.\w+$/ and -f "$File::Find::dir/.pure";
if( exists $self->{INCLUDE_EXT} ){
";
push @m, "
-\$(INST_ARCHAUTODIR)/extralibs.all: blibdirs.exists ".join(" \\\n\t", @$extra).'
+\$(INST_ARCHAUTODIR)/extralibs.all: blibdirs.ts ".join(" \\\n\t", @$extra).'
$(NOECHO) $(RM_F) $@
$(NOECHO) $(TOUCH) $@
';
$sep .= "\\\n\t";
foreach $key (qw(LIB LIBPERL_A LINKTYPE PREFIX OPTIMIZE)) {
+ next unless defined $self->{$key};
push @pasthru, "$key=\"\$($key)\"";
}
foreach $key (qw(DEFINE INC)) {
+ next unless defined $self->{$key};
push @pasthru, "PASTHRU_$key=\"\$(PASTHRU_$key)\"";
}
my $self = shift;
my($autodir) = $self->catdir('$(INST_LIB)','auto');
my $r = q{
-pm_to_blib: $(TO_INST_PM)
+# For backwards compat with anything that referenced this target.
+pm_to_blib: pm_to_blib.ts
+ $(NOOP)
+
+pm_to_blib.ts: $(TO_INST_PM)
};
my $pm_to_blib = $self->oneliner(<<CODE, ['-MExtUtils::Install']);
# Occasionally files are repeated several times from different sources
{ my(%f) = map { ($_,1) } @files; @files = keys %f; }
- # Issue a several little RM_F commands rather than risk creating a
+ # Issue a several little RM_RF commands rather than risk creating a
# very long command line (useful for extensions such as Encode
# that have many files).
my $line = "";
foreach my $file (@files) {
if (length($line) + length($file) > 200) {
- push @m, "\t\$(RM_F) $line\n";
+ push @m, "\t\$(RM_RF) $line\n";
$line = $file;
}
else {
$line .= " $file";
}
}
- push @m, "\t\$(RM_F) $line\n" if $line;
+ push @m, "\t\$(RM_RF) $line\n" if $line;
push(@m, "\t$attribs{POSTOP}\n") if $attribs{POSTOP};
join("", @m);
$switches = join ' ', @$switches;
- return qq{\$(PERLRUN) $switches -e $cmd};
+ return qq{\$(ABSPERLRUN) $switches -e $cmd};
}
my(@m);
push(@m, <<'END');
-$(INST_STATIC): $(OBJECT) $(MYEXTLIB) blibdirs.exists
+$(INST_STATIC): $(OBJECT) $(MYEXTLIB) blibdirs.ts
$(RM_RF) $@
END
return "" unless $self->needs_linking;
my $xsdir;
- foreach my $dir (@INC) {
+ my @xsubpp_dirs = @INC;
+
+ # Make sure we pick up the new xsubpp if we're building perl.
+ unshift @xsubpp_dirs, $self->{PERL_LIB} if $self->{PERL_CORE};
+
+ foreach my $dir (@xsubpp_dirs) {
$xsdir = $self->catdir($dir, 'ExtUtils');
if( -r $self->catfile($xsdir, "xsubpp") ) {
last;
push @m, $self->all_target, "\n" unless $self->{SKIPHASH}{'all'};
push @m, '
-pure_all :: config pm_to_blib subdirs linkext
+pure_all :: config pm_to_blib.ts subdirs linkext
$(NOECHO) $(NOOP)
subdirs :: $(MYEXTLIB)
$(NOECHO) $(NOOP)
-config :: $(FIRST_MAKEFILE) blibdirs.exists
+config :: $(FIRST_MAKEFILE) blibdirs.ts
$(NOECHO) $(NOOP)
';
use File::Basename;
use vars qw($Revision @ISA $VERSION);
-($VERSION) = '5.71_01';
-($Revision) = q$Revision: 1.113 $ =~ /Revision:\s+(\S+)/;
+($VERSION) = '5.71';
+($Revision) = q$Revision: 1.116 $ =~ /Revision:\s+(\S+)/;
require ExtUtils::MM_Any;
require ExtUtils::MM_Unix;
$self->{MAKE_APERL_FILE} ||= 'Makeaperl.MMS';
$self->{MAKEFILE_OLD} ||= '$(FIRST_MAKEFILE)_old';
- $self->{ECHO} ||= '$(PERLRUN) -le "print qq{@ARGV}"';
- $self->{ECHO_N} ||= '$(PERLRUN) -e "print qq{@ARGV}"';
- $self->{TOUCH} ||= '$(PERLRUN) "-MExtUtils::Command" -e touch';
- $self->{CHMOD} ||= '$(PERLRUN) "-MExtUtils::Command" -e chmod';
- $self->{RM_F} ||= '$(PERLRUN) "-MExtUtils::Command" -e rm_f';
- $self->{RM_RF} ||= '$(PERLRUN) "-MExtUtils::Command" -e rm_rf';
- $self->{TEST_F} ||= '$(PERLRUN) "-MExtUtils::Command" -e test_f';
- $self->{EQUALIZE_TIMESTAMP} ||= '$(PERLRUN) -we "open F,qq{>>$ARGV[1]};close F;utime(0,(stat($ARGV[0]))[9]+1,$ARGV[1])"';
+ $self->{ECHO} ||= '$(ABSPERLRUN) -le "print qq{@ARGV}"';
+ $self->{ECHO_N} ||= '$(ABSPERLRUN) -e "print qq{@ARGV}"';
+ $self->{TOUCH} ||= '$(ABSPERLRUN) "-MExtUtils::Command" -e touch';
+ $self->{CHMOD} ||= '$(ABSPERLRUN) "-MExtUtils::Command" -e chmod';
+ $self->{RM_F} ||= '$(ABSPERLRUN) "-MExtUtils::Command" -e rm_f';
+ $self->{RM_RF} ||= '$(ABSPERLRUN) "-MExtUtils::Command" -e rm_rf';
+ $self->{TEST_F} ||= '$(ABSPERLRUN) "-MExtUtils::Command" -e test_f';
+ $self->{EQUALIZE_TIMESTAMP} ||= '$(ABSPERLRUN) -we "open F,qq{>>$ARGV[1]};close F;utime(0,(stat($ARGV[0]))[9]+1,$ARGV[1])"';
$self->{MOD_INSTALL} ||=
$self->oneliner(<<'CODE', ['-MExtUtils::Install']);
";
push @m, '
-$(INST_DYNAMIC) : $(INST_STATIC) $(PERL_INC)perlshr_attr.opt blibdirs.exists $(EXPORT_LIST) $(PERL_ARCHIVE) $(INST_DYNAMIC_DEP)
+$(INST_DYNAMIC) : $(INST_STATIC) $(PERL_INC)perlshr_attr.opt blibdirs.ts $(EXPORT_LIST) $(PERL_ARCHIVE) $(INST_DYNAMIC_DEP)
$(NOECHO) $(MKPATH) $(INST_ARCHAUTODIR)
If F$TrnLNm("',$shr,'").eqs."" Then Define/NoLog/User ',"$shr Sys\$Share:$shr.$Config{'dlext'}",'
Link $(LDFLAGS) /Shareable=$(MMS$TARGET)$(OTHERLDFLAGS) $(BASEEXT).opt/Option,$(PERL_INC)perlshr_attr.opt/Option
# As MakeMaker mkbootstrap might not write a file (if none is required)
# we use touch to prevent make continually trying to remake it.
# The DynaLoader only reads a non-empty file.
-$(BOOTSTRAP) : $(FIRST_MAKEFILE) '."$self->{BOOTDEP}".' blibdirs.exists
+$(BOOTSTRAP) : $(FIRST_MAKEFILE) '."$self->{BOOTDEP}".' blibdirs.ts
$(NOECHO) $(ECHO) "Running mkbootstrap for $(NAME) ($(BSLOADLIBS))"
$(NOECHO) $(PERLRUN) -
-e "use ExtUtils::Mkbootstrap; Mkbootstrap(\'$(BASEEXT)\',\'$(BSLOADLIBS)\');"
$(NOECHO) $(TOUCH) $(MMS$TARGET)
-$(INST_BOOT) : $(BOOTSTRAP) blibdirs.exists
+$(INST_BOOT) : $(BOOTSTRAP) blibdirs.ts
$(NOECHO) $(RM_RF) $(INST_BOOT)
- $(CP) $(BOOTSTRAP) $(INST_BOOT)
';
my(@m,$lib);
push @m,'
# Rely on suffix rule for update action
-$(OBJECT) : blibdirs.exists
+$(OBJECT) : blibdirs.ts
$(INST_STATIC) : $(OBJECT) $(MYEXTLIB)
';
}
$todir = $self->fixpath($todir,1);
push @m, "
-$to : $from \$(FIRST_MAKEFILE) blibdirs.exists
+$to : $from \$(FIRST_MAKEFILE) blibdirs.ts
\$(CP) $from $to
";
}
}
push(@otherfiles, qw[ blib $(MAKE_APERL_FILE)
- perlmain.c blibdirs.exists pm_to_blib pm_to_blib.ts ]);
+ perlmain.c blibdirs.ts pm_to_blib.ts ]);
push(@otherfiles, $self->catfile('$(INST_ARCHAUTODIR)','extralibs.all'));
push(@otherfiles, $self->catfile('$(INST_ARCHAUTODIR)','extralibs.ld'));
# Switches must be quoted else they will be lowercased.
$switches = join ' ', map { qq{"$_"} } @$switches;
- return qq{\$(PERLRUN) $switches -e $cmd};
+ return qq{\$(ABSPERLRUN) $switches -e $cmd};
}
$self = bless {} unless ref $self;
my($fixedpath,$prefix,$name);
- if ($path =~ /\s/) {
+ if ($path =~ /[ \t]/) {
return join ' ',
map { $self->fixpath($_,$force_path) }
- split /\s+/, $path;
+ split /[ \t]+/, $path;
}
if ($path =~ m#^\$\([^\)]+\)\Z(?!\n)#s || $path =~ m#[/:>\]]#) {
return('VMS');
}
-=item blibdirs_target (override)
-
- my $make_frag = $mm->blibdirs_target;
-
-Creates the blibdirs.exists target which creates all the directories we use in
-blib/. Override because older CRTLs have trouble with C<mkpath '[.foo]'> (as
-opposed to C<mkpath 'foo.dir'>).
-
-=cut
-
-sub blibdirs_target {
- my $self = shift;
-
- my @dirs = map { uc "\$(INST_$_)" } qw(libdir
- autodir archautodir
- bin script
- man1dir man3dir
- );
-
- my $make = "\nblibdirs.exists :: \n";
- for my $dir (@dirs) {
- $make .= "\t" . '$(NOECHO) CREATE/DIRECTORY/PROTECTION=(O:RWE,G:RE,W:RE) ' . $dir . "\n";
- }
- $make .= "\t\$(NOECHO) \$(TOUCH) blibdirs.exists\n\n";
-
- return $make;
-}
-
=back
=cut
require ExtUtils::MM_Any;
require ExtUtils::MM_Unix;
@ISA = qw( ExtUtils::MM_Any ExtUtils::MM_Unix );
-$VERSION = '1.10_01';
+$VERSION = '1.10';
$ENV{EMXSHELL} = 'sh'; # to run `commands`
$self->{ECHO} ||= $self->oneliner('print qq{@ARGV}', ['-l']);
$self->{ECHO_N} ||= $self->oneliner('print qq{@ARGV}');
- $self->{TOUCH} ||= '$(PERLRUN) -MExtUtils::Command -e touch';
- $self->{CHMOD} ||= '$(PERLRUN) -MExtUtils::Command -e chmod';
- $self->{CP} ||= '$(PERLRUN) -MExtUtils::Command -e cp';
- $self->{RM_F} ||= '$(PERLRUN) -MExtUtils::Command -e rm_f';
- $self->{RM_RF} ||= '$(PERLRUN) -MExtUtils::Command -e rm_rf';
- $self->{MV} ||= '$(PERLRUN) -MExtUtils::Command -e mv';
+ $self->{TOUCH} ||= '$(ABSPERLRUN) -MExtUtils::Command -e touch';
+ $self->{CHMOD} ||= '$(ABSPERLRUN) -MExtUtils::Command -e chmod';
+ $self->{CP} ||= '$(ABSPERLRUN) -MExtUtils::Command -e cp';
+ $self->{RM_F} ||= '$(ABSPERLRUN) -MExtUtils::Command -e rm_f';
+ $self->{RM_RF} ||= '$(ABSPERLRUN) -MExtUtils::Command -e rm_rf';
+ $self->{MV} ||= '$(ABSPERLRUN) -MExtUtils::Command -e mv';
$self->{NOOP} ||= 'rem';
- $self->{TEST_F} ||= '$(PERLRUN) -MExtUtils::Command -e test_f';
+ $self->{TEST_F} ||= '$(ABSPERLRUN) -MExtUtils::Command -e test_f';
$self->{DEV_NULL} ||= '> NUL';
$self->{LD} ||= $Config{ld} || 'link';
my(@m);
push(@m, <<'END');
-$(INST_STATIC): $(OBJECT) $(MYEXTLIB) blibdirs.exists
+$(INST_STATIC): $(OBJECT) $(MYEXTLIB) blibdirs.ts
$(RM_RF) $@
END
OTHERLDFLAGS = '.$otherldflags.'
INST_DYNAMIC_DEP = '.$inst_dynamic_dep.'
-$(INST_DYNAMIC): $(OBJECT) $(MYEXTLIB) $(BOOTSTRAP) blibdirs.exists $(EXPORT_LIST) $(PERL_ARCHIVE) $(INST_DYNAMIC_DEP)
+$(INST_DYNAMIC): $(OBJECT) $(MYEXTLIB) $(BOOTSTRAP) blibdirs.ts $(EXPORT_LIST) $(PERL_ARCHIVE) $(INST_DYNAMIC_DEP)
');
if ($GCC) {
push(@m,
$switches = join ' ', @$switches;
- return qq{\$(PERLRUN) $switches -e $cmd};
+ return qq{\$(ABSPERLRUN) $switches -e $cmd};
}
package ExtUtils::MM_Win95;
use vars qw($VERSION @ISA);
-$VERSION = 0.03_01;
+$VERSION = 0.03;
require ExtUtils::MM_Win32;
@ISA = qw(ExtUtils::MM_Win32);
BEGIN {require 5.005_03;}
-$VERSION = '6.21_02';
-($Revision) = q$Revision: 1.145 $ =~ /Revision:\s+(\S+)/;
+$VERSION = '6.25';
+($Revision) = q$Revision: 1.147 $ =~ /Revision:\s+(\S+)/;
require Exporter;
use Config;
The Makefile to be produced may be altered by adding arguments of the
form C<KEY=VALUE>. E.g.
- perl Makefile.PL PREFIX=~/myperl5
+ perl Makefile.PL PREFIX=~
Other interesting targets in the generated Makefile are
This is the root directory into which the code will be installed. It
I<prepends itself to the normal prefix>. For example, if your code
-would normally go into /usr/local/lib/perl you could set DESTDIR=/other/
-and installation would go into /other/usr/local/lib/perl.
+would normally go into F</usr/local/lib/perl> you could set DESTDIR=~/tmp/
+and installation would go into F<~/tmp/usr/local/lib/perl>.
This is primarily of use for people who repackage Perl modules.
NOTE: Due to the nature of make, it is important that you put the trailing
-slash on your DESTDIR. "/other/" not "/other".
+slash on your DESTDIR. F<~/tmp/> not F<~/tmp>.
=item DIR
$VERSION = '1.00';
*VERSION = \'1.01';
- $VERSION = sprintf "%d.%03d", q$Revision: 1.145 $ =~ /(\d+)/g;
+ $VERSION = sprintf "%d.%03d", q$Revision: 1.147 $ =~ /(\d+)/g;
$FOO::VERSION = '1.10';
*FOO::VERSION = \'1.11';
our $VERSION = 1.2.3; # new for perl5.6.0
The other is to install the module in a temporary location.
- perl Makefile.PL PREFIX=/tmp LIB=/tmp/lib/perl
+ perl Makefile.PL PREFIX=~/tmp LIB=~/tmp/lib/perl
-And then set PERL5LIB to /tmp/lib/perl. This works well when you have
+And then set PERL5LIB to F<~/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.
package ExtUtils::MakeMaker::Tutorial;
use vars qw($VERSION);
-$VERSION = 0.01;
+$VERSION = 0.02;
=head1 NAME
=item Makefile.PL
When you run Makefile.PL, it makes a Makefile. That's the whole point of
-MakeMaker. The Makefile.PL is a simple module which loads
-ExtUtils::MakeMaker and runs the WriteMakefile() function with a few
-simple arguments.
+MakeMaker. The Makefile.PL is a simple program which loads
+ExtUtils::MakeMaker and runs the WriteMakefile() function to generate a
+Makefile.
Here's an example of what you need for a simple module:
You can write this by hand or generate it with 'make manifest'.
+See L<ExtUtils::Manifest> for more details.
+
=item lib/
This is the directory where your .pm and .pod files you wish to have
installed go. They are layed out according to namespace. So Foo::Bar
-is lib/Foo/Bar.pm.
+is F<lib/Foo/Bar.pm>.
=item t/
Tests for your modules go here. Each test filename ends with a .t.
-So t/foo.t. 'make test' will run these tests. The directory is flat,
+So F<t/foo.t>/ 'make test' will run these tests. The directory is flat,
you cannot, for example, have t/foo/bar.t run by 'make test'.
Tests are run from the top level of your distribution. So inside a test
require Exporter;
use Config;
-use File::Find;
+use File::Basename;
use File::Copy 'copy';
+use File::Find;
use File::Spec;
use Carp;
use strict;
$Is_MacOS $Is_VMS
$Debug $Verbose $Quiet $MANIFEST $DEFAULT_MSKIP);
-$VERSION = 1.43;
+$VERSION = 1.44;
@ISA=('Exporter');
@EXPORT_OK = qw(mkmanifest
manicheck filecheck fullcheck skipcheck
$Quiet = 0;
$MANIFEST = 'MANIFEST';
-my $Filename = __FILE__;
-$DEFAULT_MSKIP = (File::Spec->splitpath($Filename))[1].
- "$MANIFEST.SKIP";
+$DEFAULT_MSKIP = File::Spec->catfile( dirname(__FILE__), "$MANIFEST.SKIP" );
=head1 NAME
my($file) = @_;
return $file unless $Is_MacOS;
-
+
$file =~ s|^:||;
$file =~ s|([/ \n])|sprintf("\\%03o", unpack("c", $1))|ge;
$file =~ y|:|/|;
-
+
$file;
}
close MANIFEST;
}
}
-
+
# UNIMPLEMENTED
sub _normalize {
=head2 MANIFEST
+A list of files in the distribution, one file per line. The MANIFEST
+always uses Unix filepath conventions even if you're not on Unix. This
+means F<foo/bar> style not F<foo\bar>.
+
Anything between white space and an end of line within a C<MANIFEST>
-file is considered to be a comment. Filenames and comments are
-separated by one or more TAB characters in the output.
+file is considered to be a comment. Any line beginning with # is also
+a comment.
+
+ # this a comment
+ some/file
+ some/other/file comment about some/file
=head2 MANIFEST.SKIP
should be ignored by mkmanifest() and filecheck(). The regular
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:
+expression to start with a C<#>.
+
+For example:
# Version control files and dirs.
\bRCS\b
. |
MY (created by ExtUtils::MY) |
| |
- ExtUtils::MY MM (created by ExtUtils::MM)
- | | |
- ExtUtils::MM ExtUtils::MM_{Current OS}
- | | .
- | |
- ExtUtils::Liblist ExtUtils::MakeMaker .
- |
- ExtUtils::Liblist::Kid .
-
- (variable subclass)
-
- .
-
- ExtUtils::MM_{NonUnix}. . . . . . . . . . . . . . . .
- |
- ExtUtils::MM_Unix . . . . . . . . . . . . . . . . . .
- |
- ExtUtils::MM_Any
+ ExtUtils::MY MM (created by ExtUtils::MM)
+ | |
+ ExtUtils::MM
+ | | |-----------------------
+ | | |
+ ExtUtils::Liblist ExtUtils::MakeMaker |
+ | |
+ ExtUtils::Liblist::Kid |
+ |
+ |
+ |
+ ExtUtils::MM_{Current OS} (if necessary)
+ |
+ ExtUtils::MM_Unix
+ |
+ ExtUtils::MM_Any
NOTE: Yes, this is a mess. See
system.
NOTE: ExtUtils::MM_{Current OS} represents one of the ExtUtils::MM_*
-modules except ExtUtils::MM_Any.
-
-NOTE: ExtUtils::MM_{NonUnix} represents all of the ExtUtils::MM_*
-modules except ExtUtils::MM_Any and ExtUtils::MM_Unix.
+modules except ExtUtils::MM_Any chosen based on your operating system.
NOTE: The main object used by MakeMaker is a PACK### object, *not*
ExtUtils::MakeMaker. It is, effectively, a subclass of MY,
-ExtUtils::Makemaker, ExtUtils::Liblist and an ExtUtils::MM_* class
-appropriate for your operating system.
+ExtUtils::Makemaker, ExtUtils::Liblist and ExtUtils::MM_{Current OS}
NOTE: The methods in MY are simply copied into PACK### rather than
MY being a superclass of PACK###. I don't remember the rationale.
MM_Win95 MM_NW5
\ /
-MM_BeOS MM_Cygwin MM_OS2 MM_VMS MM_Win32 MM_DOS MM_MacOS MM_UWIN
- \ | | | / / / /
- ---------------------------------------------------------
+MM_BeOS MM_Cygwin MM_OS2 MM_VMS MM_Win32 MM_DOS MM_UWIN
+ \ | | | / / /
+ ------------------------------------------------
| |
MM_Unix |
| |
Using the MMS utility on VMS causes lots of extra newlines. Unknown
why this is so, might be a bug in MMS. Problem not seen with MMK.
-MacOS Classic is likely broken.
-
See TODO for details.
A little interface to ExtUtils::Installed to examine installed modules,
validate your packlists and even create a tarball from an installed module.
+=head1 SEE ALSO
+
+ExtUtils::Installed
+
=cut
}
BEGIN {
- use Test::More tests => 34;
+ use Test::More tests => 38;
use File::Spec;
}
is( ((stat($Testfile))[2] & 07777) & 0700,
($^O eq 'vos' ? 0700 : 0600), 'change a file to read-write' );
+
+ SKIP: {
+ if ($^O eq 'amigaos' || $^O eq 'os2' || $^O eq 'MSWin32' ||
+ $^O eq 'NetWare' || $^O eq 'dos' || $^O eq 'cygwin' ||
+ $^O eq 'MacOS'
+ ) {
+ skip( "different file permission semantics on $^O", 4);
+ }
+
+ @ARGV = ('testdir');
+ mkpath;
+ ok( -e 'testdir' );
+
+ # change a dir to execute-only
+ @ARGV = ( '0100', 'testdir' );
+ ExtUtils::Command::chmod();
+
+ is( ((stat('testdir'))[2] & 07777) & 0700,
+ 0100, 'change a dir to execute-only' );
+
+ # change a dir to read-only
+ @ARGV = ( '0400', 'testdir' );
+ ExtUtils::Command::chmod();
+
+ is( ((stat('testdir'))[2] & 07777) & 0700,
+ ($^O eq 'vos' ? 0500 : 0400), 'change a dir to read-only' );
+
+ # change a dir to write-only
+ @ARGV = ( '0200', 'testdir' );
+ ExtUtils::Command::chmod();
+
+ is( ((stat('testdir'))[2] & 07777) & 0700,
+ ($^O eq 'vos' ? 0700 : 0200), 'change a dir to write-only' );
+
+ @ARGV = ('testdir');
+ rm_rf;
+ }
+
+
# mkpath
@ARGV = ( File::Spec->join( 'ecmddir', 'temp2' ) );
ok( ! -e $ARGV[0], 'temp directory not there yet' );
is( $mm->{INSTALLMAN1DIR}, File::Spec->catdir('foo', 'bar') );
is( $mm->{INSTALLMAN3DIR}, File::Spec->catdir('foo', 'baz') );
SKIP: {
- skip "VMS must expand macros in INSTALL* vars", 4 if $Is_VMS;
- is( $mm->{INSTALLSITEMAN1DIR}, '$(INSTALLMAN1DIR)' );
- is( $mm->{INSTALLSITEMAN3DIR}, '$(INSTALLMAN3DIR)' );
- is( $mm->{INSTALLVENDORMAN1DIR}, '$(INSTALLMAN1DIR)' );
- is( $mm->{INSTALLVENDORMAN3DIR}, '$(INSTALLMAN3DIR)' );
+ skip "VMS must expand macros in INSTALL* vars", 4 if $Is_VMS;
+
+ is( $mm->{INSTALLSITEMAN1DIR}, '$(INSTALLMAN1DIR)' );
+ is( $mm->{INSTALLSITEMAN3DIR}, '$(INSTALLMAN3DIR)' );
+ is( $mm->{INSTALLVENDORMAN1DIR}, '$(INSTALLMAN1DIR)' );
+ is( $mm->{INSTALLVENDORMAN3DIR}, '$(INSTALLMAN3DIR)' );
}
}
is( $mm->{INSTALLMAN1DIR}, File::Spec->catdir('foo', 'bar') );
is( $mm->{INSTALLMAN3DIR}, File::Spec->catdir('foo', 'baz') );
SKIP: {
- skip "VMS must expand macros in INSTALL* vars", 2 if $Is_VMS;
- is( $mm->{INSTALLSITEMAN1DIR}, '$(INSTALLMAN1DIR)' );
- is( $mm->{INSTALLSITEMAN3DIR}, '$(INSTALLMAN3DIR)' );
+ skip "VMS must expand macros in INSTALL* vars", 2 if $Is_VMS;
+ is( $mm->{INSTALLSITEMAN1DIR}, '$(INSTALLMAN1DIR)' );
+ is( $mm->{INSTALLSITEMAN3DIR}, '$(INSTALLMAN3DIR)' );
}
is( $mm->{INSTALLVENDORMAN1DIR}, '' );
is( $mm->{INSTALLVENDORMAN3DIR}, '' );
if( $ENV{PERL_CORE} ) {
chdir 't' if -d 't';
unshift @INC, '../lib';
- require Config; import Config;
- if ($Config{'extensions'} !~ /\bData\/Dumper\b/) {
- print "1..0 # Skip: Data::Dumper was not built\n";
- exit 0;
- }
}
else {
unshift @INC, 't/lib';
use strict;
use Test::More tests => 6;
-use Data::Dumper;
+
BEGIN {
use_ok( 'ExtUtils::Liblist' );
unlike( $out[2], qr/-ln0tt43r3_perl/, 'bogus library not added' );
ok( @warn, 'had warning');
- is( grep(/\QNote (probably harmless): No library found for \E(-l)?n0tt43r3_perl/, map { @$_ } @warn), 1 ) || diag Dumper @warn;
+ is( grep(/\QNote (probably harmless): No library found for \E(-l)?n0tt43r3_perl/, map { @$_ } @warn), 1 ) || diag join "\n", @warn;
}
# only one of the following can be true
# test should be removed if MM_Unix ever stops handling other OS than Unix
my $os = ($ExtUtils::MM_Unix::Is_OS2 || 0)
- + ($ExtUtils::MM_Unix::Is_Mac || 0)
+ ($ExtUtils::MM_Unix::Is_Win32 || 0)
+ ($ExtUtils::MM_Unix::Is_Dos || 0)
+ ($ExtUtils::MM_Unix::Is_VMS || 0);
{
my $my_perl = $1 if $^X =~ /(.*)/; # are we in -T or -t?
my( $perl, $path ) = fileparse( $my_perl );
- like( $MM->find_perl( $], [ $perl ], [ $path ], 0 ), \r
+ like( $MM->find_perl( $], [ $perl ], [ $path ], 0 ),
qr/^\Q$my_perl\E$/i, 'find_perl() finds this perl' );
}
--- /dev/null
+#!/usr/bin/perl -w
+
+BEGIN {
+ if( $ENV{PERL_CORE} ) {
+ chdir 't';
+ @INC = ('../lib', 'lib/');
+ }
+ else {
+ unshift @INC, 't/lib/';
+ }
+}
+chdir 't';
+
+use Test::More tests => 1;
+use ExtUtils::MakeMaker;
+
+# For backwards compat with some Tk modules, dir_target() has to be there.
+can_ok('MM', 'dir_target');
\ No newline at end of file
@INC = grep { $_ ne $curdir && $_ ne '.' } @INC;
mkdir('hints', 0777);
-my $hint_file = File::Spec->catfile('hints', "$^O.pl");
+(my $os = $^O) =~ s/\./_/g;
+my $hint_file = File::Spec->catfile('hints', "$os.pl");
+
open(HINT, ">$hint_file") || die "Can't write dummy hints file $hint_file: $!";
print HINT <<'CLOO';
$self->{CCFLAGS} = 'basset hounds got long ears';
sub try_oneliner {
my($code, $switches, $expect, $name) = @_;
my $cmd = $mm->oneliner($code, $switches);
- $cmd =~ s{\$\(PERLRUN\)}{$^X};
+ $cmd =~ s{\$\(ABSPERLRUN\)}{$^X};
# VMS likes to put newlines at the end of commands if there isn't
# one already.
}
chdir 't';
-use Test::More 'no_plan';
+use Test::More tests => 10;
use ExtUtils::MakeMaker;
my %versions = ('$VERSION = 0.02' => 0.02,
if( $ENV{PERL_CORE} ) {
chdir 't' if -d 't';
@INC = ('../lib', 'lib');
- require Config; import Config;
- if ($Config{'extensions'} !~ /\bData\/Dumper\b/) {
- print "1..0 # Skip: Data::Dumper was not built\n";
- exit 0;
- }
}
else {
unshift @INC, 't/lib';
use strict;
use Config;
-use Test::More tests => 11;
+use Test::More;
+
+unless( eval { require Data::Dumper } ) {
+ plan skip_all => 'Data::Dumper not available';
+}
+
+plan tests => 11;
+
+
use MakeMaker::Test::Utils;
use MakeMaker::Test::Setup::BFD;
sub _run {
my @cmds = @_;
- s{\$\(PERLRUN\)}{$perl} foreach @cmds;
+ s{\$\(ABSPERLRUN\)}{$perl} foreach @cmds;
if( $Is_VMS ) {
s{-\n}{} foreach @cmds
}