# environment variables on VMS
my @toolchain = qw(cpan/AutoLoader/lib
dist/Cwd dist/Cwd/lib
- cpan/ExtUtils-Command/lib
+ dist/ExtUtils-Command/lib
dist/ExtUtils-Install/lib
cpan/ExtUtils-MakeMaker/lib
- cpan/ExtUtils-Manifest/lib
+ dist/ExtUtils-Manifest/lib
cpan/File-Path/lib
);
# It's actually a cut and shut of the Unix version ext/utils/makeext and the
# Windows version win32/build_ext.pl hence the two invocation styles.
-# On Unix, it primarily used by the perl Makefile one extention at a time:
+# On Unix, it primarily used by the perl Makefile one extension at a time:
#
# d_dummy $(dynamic_ext): miniperl preplibrary FORCE
# @$(RUN) ./miniperl make_ext.pl --target=dynamic $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL)
# If '--static' is specified, static extensions will be built.
# If '--dynamic' is specified, dynamic extensions will be built.
# If '--nonxs' is specified, nonxs extensions will be built.
-# If '--dynaloader' is specificied, DynaLoader will be built.
+# If '--dynaloader' is specified, DynaLoader will be built.
# If '--all' is specified, all extensions will be built.
#
# make_ext.pl "MAKE=make [-make_opts]" --dir=directory [--target=target] [--static|--dynamic|--all] +ext2 !ext1
if (!-f $makefile) {
if (!-f 'Makefile.PL') {
print "\nCreating Makefile.PL in $ext_dir for $mname\n";
- # We need to cope well with various possible layouts
- my @dirs = split /::/, $mname;
- my $leaf = pop @dirs;
- my $leafname = "$leaf.pm";
- my $pathname = join '/', @dirs, $leafname;
- my @locations = ($leafname, $pathname, "lib/$pathname");
- my $fromname;
- foreach (@locations) {
- if (-f $_) {
- $fromname = $_;
- last;
+ my ($fromname, $key, $value);
+ if ($mname eq 'podlators') {
+ # We need to special case this somewhere, and this is fewer
+ # lines of code than a core-only Makefile.PL, and no more
+ # complex
+ $fromname = 'VERSION';
+ $key = 'DISTNAME';
+ $value = 'podlators';
+ $mname = 'Pod';
+ } else {
+ $key = 'ABSTRACT_FROM';
+ # We need to cope well with various possible layouts
+ my @dirs = split /::/, $mname;
+ my $leaf = pop @dirs;
+ my $leafname = "$leaf.pm";
+ my $pathname = join '/', @dirs, $leafname;
+ my @locations = ($leafname, $pathname, "lib/$pathname");
+ foreach (@locations) {
+ if (-f $_) {
+ $fromname = $_;
+ last;
+ }
}
- }
- unless ($fromname) {
- die "For $mname tried @locations in in $ext_dir but can't find source";
+ unless ($fromname) {
+ die "For $mname tried @locations in in $ext_dir but can't find source";
+ }
+ ($value = $fromname) =~ s/\.pm\z/.pod/;
+ $value = $fromname unless -e $value;
}
- my $pod_name;
- ($pod_name = $fromname) =~ s/\.pm\z/.pod/;
- $pod_name = $fromname unless -e $pod_name;
open my $fh, '>', 'Makefile.PL'
or die "Can't open Makefile.PL for writing: $!";
- printf $fh <<'EOM', $0, $mname, $fromname, $pod_name;
+ printf $fh <<'EOM', $0, $mname, $fromname, $key, $value;
#-*- buffer-read-only: t -*-
# This Makefile.PL was written by %s.
# hash.
my @temps = 'Makefile.PL';
foreach (glob('scripts/pod*.PL')) {
- # The various pod*.PL extrators change directory. Doing that with relative
+ # The various pod*.PL extractors change directory. Doing that with relative
# paths in @INC breaks. It seems the lesser of two evils to copy (to avoid)
# the chdir doing anything, than to attempt to convert lib paths to
# absolute, and potentially run into problems with quoting special
my %%pod_scripts;
foreach (glob('pod*.PL')) {
my $script = $_;
- s/.PL$/$script_ext/;
+ s/.PL$/$script_ext/i;
$pod_scripts{$script} = $_;
}
my @exe_files = values %%pod_scripts;
WriteMakefile(
NAME => '%s',
VERSION_FROM => '%s',
- ABSTRACT_FROM => '%s',
+ %-13s => '%s',
realclean => { FILES => "@temps" },
(%%pod_scripts ? (
PL_FILES => \%%pod_scripts,