-# $Id: /local/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm 19606 2006-10-10T01:01:21.319714Z schwern $
+# $Id: /local/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm 27436 2007-02-21T15:59:55.429725Z schwern $
package ExtUtils::MakeMaker;
BEGIN {require 5.005_03;}
use vars qw(
@ISA @EXPORT @EXPORT_OK
- $VERSION $Verbose %Config
+ $VERSION $Verbose %Config
@Prepend_parent @Parent
- %Recognized_Att_Keys @Get_from_Config @MM_Sections @Overridable
+ %Recognized_Att_Keys @Get_from_Config @MM_Sections @Overridable
$Filename
);
use vars qw($Revision);
use strict;
-$VERSION = '6.31_01';
-($Revision) = q$Revision: 19606 $ =~ /Revision:\s+(\S+)/;
+$VERSION = '6.32_01';
+($Revision) = q$Revision: 27436 $ =~ /Revision:\s+(\S+)/;
@ISA = qw(Exporter);
@EXPORT = qw(&WriteMakefile &writeMakefile $Verbose &prompt);
-@EXPORT_OK = qw($VERSION &neatvalue &mkbootstrap &mksymlists);
+@EXPORT_OK = qw($VERSION &neatvalue &mkbootstrap &mksymlists
+ &WriteEmptyMakefile);
# These will go away once the last of the Win32 & VMS specific code is
# purged.
}
sub WriteEmptyMakefile {
- Carp::croak "WriteEmptyMakefile: Need even number of args" if @_ % 2;
+ Carp::croak "WriteEmptyMakefile: Need an even number of args" if @_ % 2;
my %att = @_;
my $self = MM->new(\%att);
- if (-f $self->{MAKEFILE_OLD}) {
- _unlink($self->{MAKEFILE_OLD}) or
- warn "unlink $self->{MAKEFILE_OLD}: $!";
+ my $new = $self->{FIRST_MAKEFILE};
+ my $old = $self->{MAKEFILE_OLD};
+ if (-f $old) {
+ _unlink($old) or warn "unlink $old: $!";
}
- if ( -f $self->{MAKEFILE} ) {
- _rename($self->{MAKEFILE}, $self->{MAKEFILE_OLD}) or
- warn "rename $self->{MAKEFILE} => $self->{MAKEFILE_OLD}: $!"
+ if ( -f $new ) {
+ _rename($new, $old) or warn "rename $new => $old: $!"
}
- open MF, '>'.$self->{MAKEFILE} or die "open $self->{MAKEFILE} for write: $!";
+ open MF, '>'.$new or die "open $new for write: $!";
print MF <<'EOP';
all:
test:
EOP
- close MF or die "close $self->{MAKEFILE} for write: $!";
+ close MF or die "close $new for write: $!";
}
sub check_manifest {
my $self = shift;
my($chunk);
local *FH;
- print STDOUT "Writing $self->{MAKEFILE} for $self->{NAME}\n";
+ my($finalname) = $self->{FIRST_MAKEFILE};
+ print STDOUT "Writing $finalname for $self->{NAME}\n";
- unlink($self->{MAKEFILE}, "MakeMaker.tmp", $Is_VMS ? 'Descrip.MMS' : '');
+ unlink($finalname, "MakeMaker.tmp", $Is_VMS ? 'Descrip.MMS' : ());
open(FH,">MakeMaker.tmp") or die "Unable to open MakeMaker.tmp: $!";
for $chunk (@{$self->{RESULT}}) {
}
close FH;
- my($finalname) = $self->{MAKEFILE};
_rename("MakeMaker.tmp", $finalname) or
warn "rename MakeMaker.tmp => $finalname: $!";
chmod 0644, $finalname unless $Is_VMS;
To have everything installed in your home directory, do the following.
- perl Makefile.PL INSTALL_BASE=~
+ # Unix users, INSTALL_BASE=~ works fine
+ perl Makefile.PL INSTALL_BASE=/path/to/your/home/dir
Like PREFIX, it sets several INSTALL* attributes at once. Unlike
PREFIX it is easy to predict where the module will end up. The
PREFIX and LIB can be used to set several INSTALL* attributes in one
go. Here's an example for installing into your home directory.
- perl Makefile.PL PREFIX=~
+ # Unix users, PREFIX=~ works fine
+ perl Makefile.PL PREFIX=/path/to/your/home/dir
This will install all files in the module under your home directory,
with man pages and libraries going into an appropriate place (usually
$VERSION = '1.00';
*VERSION = \'1.01';
- $VERSION = (q$Revision: 19606 $) =~ /(\d+)/g;
+ $VERSION = (q$Revision: 27436 $) =~ /(\d+)/g;
$FOO::VERSION = '1.10';
*FOO::VERSION = \'1.11';
our $VERSION = 1.2.3; # new for perl5.6.0
can create a F<Makefile> which does nothing, but succeeds on all the
"usual" build targets. To do so, use
- ExtUtils::MakeMaker::WriteEmptyMakefile();
+ use ExtUtils::MakeMaker qw(WriteEmptyMakefile);
+ WriteEmptyMakefile();
instead of WriteMakefile().