use ExtUtils::MakeMaker qw($Verbose neatvalue);
-$VERSION = '1.44';
+$VERSION = '1.45';
require ExtUtils::MM_Any;
@ISA = qw(ExtUtils::MM_Any);
join "", @m;
}
+
+=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.
+ my $blib_addition = '';
+ $blib_addition = <<MAKE_FRAG if @targs;
+blibdirs :: @targs
+ \$(NOECHO) \$(NOOP)
+
+MAKE_FRAG
+
+ return $blib_addition . $make;
+}
+
+
=item init_DEST
$mm->init_DEST
# 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';
}
}
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
require File::Find;
File::Find::find(sub {
return unless m/\Q$self->{LIB_EXT}\E$/;
- return if m/^libperl/;
+ 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";
$(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}}));
$(NOECHO) $(NOOP)
';
- push @m, $self->blibdirs_target;
-
push @m, '
$(O_FILES): $(H_FILES)
' if @{$self->{O_FILES} || []} && @{$self->{H} || []};
push @m, q{
-help:
+help :
perldoc ExtUtils::MakeMaker
};