1 package ExtUtils::MM_Win32;
5 ExtUtils::MM_Win32 - methods to override UN*X behaviour in ExtUtils::MakeMaker
9 use ExtUtils::MM_Win32; # Done internally by ExtUtils::MakeMaker if needed
13 See ExtUtils::MM_Unix for a documentation of the methods provided
14 there. This package overrides the implementation of these methods, not
26 Exporter::import('ExtUtils::MakeMaker',
27 qw( $Verbose &neatvalue));
29 $ENV{EMXSHELL} = 'sh'; # to run `commands`
30 unshift @MM::ISA, 'ExtUtils::MM_Win32';
32 $BORLAND = 1 if $Config{'cc'} =~ /^bcc/i;
33 $GCC = 1 if $Config{'cc'} =~ /^gcc/i;
34 $DMAKE = 1 if $Config{'make'} =~ /^dmake/i;
35 $NMAKE = 1 if $Config{'make'} =~ /^nmake/i;
36 $PERLMAKE = 1 if $Config{'make'} =~ /^pmake/i;
37 $OBJ = 1 if $Config{'ccflags'} =~ /PERL_OBJECT/i;
40 my($self,%attribs) = @_;
42 my($funcs) = $attribs{DL_FUNCS} || $self->{DL_FUNCS} || {};
43 my($vars) = $attribs{DL_VARS} || $self->{DL_VARS} || [];
44 my($funclist) = $attribs{FUNCLIST} || $self->{FUNCLIST} || [];
45 my($imports) = $attribs{IMPORTS} || $self->{IMPORTS} || {};
47 (my $boot = $self->{NAME}) =~ s/:/_/g;
49 if (not $self->{SKIPHASH}{'dynamic'}) {
51 $self->{BASEEXT}.def: Makefile.PL
53 q! $(PERL) "-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" -MExtUtils::Mksymlists \\
54 -e "Mksymlists('NAME' => '!, $self->{NAME},
55 q!', 'DLBASE' => '!,$self->{DLBASE},
56 q!', 'DL_FUNCS' => !,neatvalue($funcs),
57 q!, 'FUNCLIST' => !,neatvalue($funclist),
58 q!, 'IMPORTS' => !,neatvalue($imports),
59 q!, 'DL_VARS' => !, neatvalue($vars), q!);"
65 sub replace_manpage_separator {
73 my @e = exists($ENV{'PATHEXT'})
74 ? split(/;/, $ENV{PATHEXT})
75 : qw(.com .exe .bat .cmd);
77 for (@e) { $e .= "\Q$_\E|" }
79 # see if file ends in one of the known extensions
80 if ($file =~ /($e)$/i) {
81 return $file if -e $file;
85 return "$file$_" if -e "$file$_";
91 sub file_name_is_absolute {
93 $file =~ m{^([a-z]:)?[\\/]}i ;
97 my($self, $ver, $names, $dirs, $trace) = @_;
100 print "Looking for perl $ver by these names:
106 foreach $dir (@$dirs){
107 next unless defined $dir; # $self->{PERL_SRC} may be undefined
108 foreach $name (@$names){
110 if ($self->file_name_is_absolute($name)) { # /foo/bar
112 } elsif ($self->canonpath($name) eq $self->canonpath(basename($name))) { # foo
113 $abs = $self->catfile($dir, $name);
115 $abs = $self->canonpath($self->catfile($self->curdir, $name));
117 print "Checking $abs\n" if ($trace >= 2);
118 next unless $self->maybe_command($abs);
119 print "Executing $abs\n" if ($trace >= 2);
120 $val = `$abs -e "require $ver;" 2>&1`;
122 print "Using PERL=$abs\n" if $trace;
124 } elsif ($trace >= 2) {
125 print "Result: `$val'\n";
129 print STDOUT "Unable to find a perl $ver (by these names: @$names, in these dirs: @$dirs)\n";
130 0; # false and not empty
137 # append a slash to each argument unless it has one there
138 $_ .= "\\" if $_ eq '' or substr($_,-1) ne "\\";
140 my $result = $self->canonpath(join('', @args));
146 Concatenate one or more directory names and a filename to form a
147 complete path ending with a filename
154 return $file unless @_;
155 my $dir = $self->catdir(@_);
157 $dir .= "\\" unless substr($dir,length($dir)-1,1) eq "\\";
164 &ExtUtils::MM_Unix::init_others;
165 $self->{'TOUCH'} = '$(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Command -e touch';
166 $self->{'CHMOD'} = '$(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Command -e chmod';
167 $self->{'CP'} = '$(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Command -e cp';
168 $self->{'RM_F'} = '$(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Command -e rm_f';
169 $self->{'RM_RF'} = '$(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Command -e rm_rf';
170 $self->{'MV'} = '$(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Command -e mv';
171 $self->{'NOOP'} = 'rem';
172 $self->{'TEST_F'} = '$(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Command -e test_f';
173 $self->{'LD'} = $Config{'ld'} || 'link';
174 $self->{'AR'} = $Config{'ar'} || 'lib';
175 $self->{'LDLOADLIBS'} ||= $Config{'libs'};
176 # -Lfoo must come first for Borland, so we put it in LDDLFLAGS
178 my $libs = $self->{'LDLOADLIBS'};
180 while ($libs =~ s/(?:^|\s)(("?)-L.+?\2)(?:\s|$)/ /) {
181 $libpath .= ' ' if length $libpath;
184 $self->{'LDLOADLIBS'} = $libs;
185 $self->{'LDDLFLAGS'} ||= $Config{'lddlflags'};
186 $self->{'LDDLFLAGS'} .= " $libpath";
188 $self->{'DEV_NULL'} = '> NUL';
189 # $self->{'NOECHO'} = ''; # till we have it working
195 Initializes lots of constants and .SUFFIXES and .PHONY
205 AR_STATIC_ARGS NAME DISTNAME NAME_SYM VERSION
206 VERSION_SYM XS_VERSION INST_BIN INST_EXE INST_LIB
207 INST_ARCHLIB INST_SCRIPT PREFIX INSTALLDIRS
208 INSTALLPRIVLIB INSTALLARCHLIB INSTALLSITELIB
209 INSTALLSITEARCH INSTALLBIN INSTALLSCRIPT PERL_LIB
210 PERL_ARCHLIB SITELIBEXP SITEARCHEXP LIBPERL_A MYEXTLIB
211 FIRST_MAKEFILE MAKE_APERL_FILE PERLMAINCC PERL_SRC
212 PERL_INC PERL FULLPERL
215 next unless defined $self->{$tmp};
216 push @m, "$tmp = $self->{$tmp}\n";
220 VERSION_MACRO = VERSION
221 DEFINE_VERSION = -D\$(VERSION_MACRO)=\\\"\$(VERSION)\\\"
222 XS_VERSION_MACRO = XS_VERSION
223 XS_DEFINE_VERSION = -D\$(XS_VERSION_MACRO)=\\\"\$(XS_VERSION)\\\"
227 MAKEMAKER = $INC{'ExtUtils\MakeMaker.pm'}
228 MM_VERSION = $ExtUtils::MakeMaker::VERSION
232 # FULLEXT = Pathname for extension directory (eg Foo/Bar/Oracle).
233 # BASEEXT = Basename part of FULLEXT. May be just equal FULLEXT. (eg Oracle)
234 # ROOTEXT = Directory part of FULLEXT with leading slash (eg /DBD) !!! Deprecated from MM 5.32 !!!
235 # PARENT_NAME = NAME without BASEEXT and no trailing :: (eg Foo::Bar)
236 # DLBASE = Basename part of dynamic library. May be just equal BASEEXT.
240 FULLEXT BASEEXT PARENT_NAME DLBASE VERSION_FROM INC DEFINE OBJECT
243 next unless defined $self->{$tmp};
244 push @m, "$tmp = $self->{$tmp}\n";
248 # Handy lists of source code files:
249 XS_FILES= ".join(" \\\n\t", sort keys %{$self->{XS}})."
250 C_FILES = ".join(" \\\n\t", @{$self->{C}})."
251 O_FILES = ".join(" \\\n\t", @{$self->{O_FILES}})."
252 H_FILES = ".join(" \\\n\t", @{$self->{H}})."
253 HTMLLIBPODS = ".join(" \\\n\t", sort keys %{$self->{HTMLLIBPODS}})."
254 HTMLSCRIPTPODS = ".join(" \\\n\t", sort keys %{$self->{HTMLSCRIPTPODS}})."
255 MAN1PODS = ".join(" \\\n\t", sort keys %{$self->{MAN1PODS}})."
256 MAN3PODS = ".join(" \\\n\t", sort keys %{$self->{MAN3PODS}})."
260 INST_HTMLPRIVLIBDIR INSTALLHTMLPRIVLIBDIR
261 INST_HTMLSITELIBDIR INSTALLHTMLSITELIBDIR
262 INST_HTMLSCRIPTDIR INSTALLHTMLSCRIPTDIR
263 INST_HTMLLIBDIR HTMLEXT
264 INST_MAN1DIR INSTALLMAN1DIR MAN1EXT
265 INST_MAN3DIR INSTALLMAN3DIR MAN3EXT
267 next unless defined $self->{$tmp};
268 push @m, "$tmp = $self->{$tmp}\n";
276 .NO_CONFIG_REC: Makefile
277 } if $ENV{CLEARCASE_ROOT};
279 # why not q{} ? -- emacs
281 # work around a famous dec-osf make(1) feature(?):
284 .SUFFIXES: .xs .c .C .cpp .cxx .cc \$(OBJ_EXT)
286 # Nick wanted to get rid of .PRECIOUS. I don't remember why. I seem to recall, that
287 # some make implementations will delete the Makefile when we rebuild it. Because
288 # we call false(1) when we rebuild it. So make(1) is not completely wrong when it
289 # does so. Our milage may vary.
290 # .PRECIOUS: Makefile # seems to be not necessary anymore
292 .PHONY: all config static dynamic test linkext manifest
294 # Where is the Config information that we are using/depend on
295 CONFIGDEP = \$(PERL_ARCHLIB)\\Config.pm \$(PERL_INC)\\config.h
298 my @parentdir = split(/::/, $self->{PARENT_NAME});
300 # Where to put things:
301 INST_LIBDIR = }. $self->catdir('$(INST_LIB)',@parentdir) .q{
302 INST_ARCHLIBDIR = }. $self->catdir('$(INST_ARCHLIB)',@parentdir) .q{
304 INST_AUTODIR = }. $self->catdir('$(INST_LIB)','auto','$(FULLEXT)') .q{
305 INST_ARCHAUTODIR = }. $self->catdir('$(INST_ARCHLIB)','auto','$(FULLEXT)') .q{
308 if ($self->has_link_code()) {
310 INST_STATIC = $(INST_ARCHAUTODIR)\$(BASEEXT)$(LIB_EXT)
311 INST_DYNAMIC = $(INST_ARCHAUTODIR)\$(DLBASE).$(DLEXT)
312 INST_BOOT = $(INST_ARCHAUTODIR)\$(BASEEXT).bs
322 $tmp = $self->export_list;
326 $tmp = $self->perl_archive;
332 #INST_PM = }.join(" \\\n\t", sort values %{$self->{PM}}).q{
334 #PM_TO_BLIB = }.join(" \\\n\t", %{$self->{PM}}).q{
338 TO_INST_PM = }.join(" \\\n\t", sort keys %{$self->{PM}}).q{
340 PM_TO_BLIB = }.join(" \\\n\t", %{$self->{PM}}).q{
350 my $path = $ENV{'PATH'} || $ENV{'Path'} || $ENV{'path'};
351 my @path = split(';',$path);
352 foreach(@path) { $_ = '.' if $_ eq '' }
358 Defines how to produce the *.a (or equivalent) files.
364 # Come to think of it, if there are subdirs with linkcode, we still have no INST_STATIC
365 # return '' unless $self->needs_linking(); #might be because of a subdir
367 return '' unless $self->has_link_code;
371 $(INST_STATIC): $(OBJECT) $(MYEXTLIB) $(INST_ARCHAUTODIR)\.exists
374 # If this extension has it's own library (eg SDBM_File)
375 # then copy that to $(INST_STATIC) and add $(OBJECT) into it.
376 push(@m, "\t$self->{CP} \$(MYEXTLIB) \$\@\n") if $self->{MYEXTLIB};
379 q{ $(AR) }.($BORLAND ? '$@ $(OBJECT:^"+")'
380 : ($GCC ? '-ru $@ $(OBJECT)'
381 : '-out:$@ $(OBJECT)')).q{
382 }.$self->{NOECHO}.q{echo "$(EXTRALIBS)" > $(INST_ARCHAUTODIR)\extralibs.ld
386 # Old mechanism - still available:
388 push @m, "\t$self->{NOECHO}".q{echo "$(EXTRALIBS)" >> $(PERL_SRC)\ext.libs}."\n\n"
389 if $self->{PERL_SRC};
391 push @m, $self->dir_target('$(INST_ARCHAUTODIR)');
397 Defines targets for bootstrap files.
402 my($self, %attribs) = @_;
405 ' unless $self->has_link_code();
408 BOOTSTRAP = '."$self->{BASEEXT}.bs".'
410 # As Mkbootstrap might not write a file (if none is required)
411 # we use touch to prevent make continually trying to remake it.
412 # The DynaLoader only reads a non-empty file.
413 $(BOOTSTRAP): '."$self->{MAKEFILE} $self->{BOOTDEP}".' $(INST_ARCHAUTODIR)\.exists
414 '.$self->{NOECHO}.'echo "Running Mkbootstrap for $(NAME) ($(BSLOADLIBS))"
415 '.$self->{NOECHO}.'$(PERL) "-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" \
416 -MExtUtils::Mkbootstrap \
417 -e "Mkbootstrap(\'$(BASEEXT)\',\'$(BSLOADLIBS)\');"
418 '.$self->{NOECHO}.'$(TOUCH) $(BOOTSTRAP)
421 $(INST_BOOT): $(BOOTSTRAP) $(INST_ARCHAUTODIR)\.exists
422 '."$self->{NOECHO}$self->{RM_RF}".' $(INST_BOOT)
423 -'.$self->{CP}.' $(BOOTSTRAP) $(INST_BOOT)
428 =item dynamic_lib (o)
430 Defines how to produce the *.so (or equivalent) files.
435 my($self, %attribs) = @_;
436 return '' unless $self->needs_linking(); #might be because of a subdir
438 return '' unless $self->has_link_code;
440 my($otherldflags) = $attribs{OTHERLDFLAGS} || ($BORLAND ? 'c0d32.obj': '');
441 my($inst_dynamic_dep) = $attribs{INST_DYNAMIC_DEP} || "";
442 my($ldfrom) = '$(LDFROM)';
445 # This section creates the dynamically loadable $(INST_DYNAMIC)
446 # from $(OBJECT) and possibly $(MYEXTLIB).
447 OTHERLDFLAGS = '.$otherldflags.'
448 INST_DYNAMIC_DEP = '.$inst_dynamic_dep.'
450 $(INST_DYNAMIC): $(OBJECT) $(MYEXTLIB) $(BOOTSTRAP) $(INST_ARCHAUTODIR)\.exists $(EXPORT_LIST) $(PERL_ARCHIVE) $(INST_DYNAMIC_DEP)
454 q{ dlltool --def $(EXPORT_LIST) --output-exp dll.exp
455 $(LD) -o $@ -Wl,--base-file -Wl,dll.base $(LDDLFLAGS) }.$ldfrom.q{ $(OTHERLDFLAGS) $(MYEXTLIB) $(PERL_ARCHIVE) $(LDLOADLIBS) dll.exp
456 dlltool --def $(EXPORT_LIST) --base-file dll.base --output-exp dll.exp
457 $(LD) -o $@ $(LDDLFLAGS) }.$ldfrom.q{ $(OTHERLDFLAGS) $(MYEXTLIB) $(PERL_ARCHIVE) $(LDLOADLIBS) dll.exp });
460 q{ $(LD) $(LDDLFLAGS) $(OTHERLDFLAGS) }.$ldfrom.q{,$@,,}
461 .($DMAKE ? q{$(PERL_ARCHIVE:s,/,\,) $(LDLOADLIBS:s,/,\,) }
462 .q{$(MYEXTLIB:s,/,\,),$(EXPORT_LIST:s,/,\,)}
463 : q{$(subst /,\,$(PERL_ARCHIVE)) $(subst /,\,$(LDLOADLIBS)) }
464 .q{$(subst /,\,$(MYEXTLIB)),$(subst /,\,$(EXPORT_LIST))})
468 q{ $(LD) -out:$@ $(LDDLFLAGS) }.$ldfrom.q{ $(OTHERLDFLAGS) }
469 .q{$(MYEXTLIB) $(PERL_ARCHIVE) $(LDLOADLIBS) -def:$(EXPORT_LIST)});
475 push @m, $self->dir_target('$(INST_ARCHAUTODIR)');
484 return '$(PERL_INC)\perlCAPI$(LIB_EXT)';
487 return '$(PERL_INC)\\'.$Config{'libperl'};
493 return "$self->{BASEEXT}.def";
498 No physical check on the filesystem, but a logical cleanup of a
499 path. On UNIX eliminated successive slashes and successive "/.".
504 my($self,$path) = @_;
505 $path =~ s/^([a-z]:)/\u$1/;
507 $path =~ s|(.)\\+|$1\\|g ; # xx////xx -> xx/xx
508 $path =~ s|(\\\.)+\\|\\|g ; # xx/././xx -> xx/xx
509 $path =~ s|^(\.\\)+|| unless $path eq ".\\"; # ./xx -> xx
511 unless $path =~ m#^([a-z]:)?\\#; # xx/ -> xx
512 $path .= '.' if $path =~ m#\\$#;
518 Takes one argument, a file name, and returns the file name, if the
519 argument is likely to be a perl script. On MM_Unix this is true for
520 any ordinary, readable file.
525 my($self,$file) = @_;
526 return $file if -r $file && -f _;
527 return "$file.pl" if -r "$file.pl" && -f _;
528 return "$file.bat" if -r "$file.bat" && -f _;
534 Defines target that copies all files in the hash PM to their
535 destination and autosplits them. See L<ExtUtils::Install/DESCRIPTION>
541 my($autodir) = $self->catdir('$(INST_LIB)','auto');
543 pm_to_blib: $(TO_INST_PM)
544 }.$self->{NOECHO}.q{$(PERL) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)" \
545 "-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" -MExtUtils::Install \
547 ($NMAKE ? 'qw[ <<pmfiles.dat ],'
548 : $DMAKE ? 'qw[ $(mktmp,pmfiles.dat $(PM_TO_BLIB:s,\\,\\\\,)\n) ],'
549 : '{ qw[$(PM_TO_BLIB)] },'
550 ).q{'}.$autodir.q{')"
554 } : '') . $self->{NOECHO}.q{$(TOUCH) $@
558 =item test_via_harness (o)
560 Helper method to write the test targets
564 sub test_via_harness {
565 my($self, $perl, $tests) = @_;
566 "\t$perl".q! -Mblib -I$(PERL_ARCHLIB) -I$(PERL_LIB) -e "use Test::Harness qw(&runtests $$verbose); $$verbose=$(TEST_VERBOSE); runtests @ARGV;" !."$tests\n";
570 =item tool_autosplit (override)
572 Use Win32 quoting on command line.
577 my($self, %attribs) = @_;
579 $asl = "\$AutoSplit::Maxlen=$attribs{MAXLEN};" if $attribs{MAXLEN};
581 # Usage: $(AUTOSPLITFILE) FileToSplit AutoDirToSplitInto
582 AUTOSPLITFILE = $(PERL) "-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" -MAutoSplit }.$asl.q{ -e "autosplit($$ARGV[0], $$ARGV[1], 0, 1, 1);"
586 =item tools_other (o)
590 Defines SHELL, LD, TOUCH, CP, MV, RM_F, RM_RF, CHMOD, UMASK_NULL in
591 the Makefile. Also defines the perl programs MKPATH,
592 WARN_IF_OLD_PACKLIST, MOD_INSTALL. DOC_INSTALL, and UNINSTALL.
599 my $bin_sh = $Config{sh} || 'cmd /c';
602 } unless $DMAKE; # dmake determines its own shell
604 for (qw/ CHMOD CP LD MV NOOP RM_F RM_RF TEST_F TOUCH UMASK_NULL DEV_NULL/ ) {
605 push @m, "$_ = $self->{$_}\n";
609 # The following is a portable way to say mkdir -p
610 # To see which directories are created, change the if 0 to if 1
611 MKPATH = $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Command -e mkpath
613 # This helps us to minimize the effect of the .exists files A yet
614 # better solution would be to have a stable file in the perl
615 # distribution with a timestamp of zero. But this solution doesn't
616 # need any changes to the core distribution and works with older perls
617 EQUALIZE_TIMESTAMP = $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Command -e eqtime
621 return join "", @m if $self->{PARENT};
624 # Here we warn users that an old packlist file was found somewhere,
625 # and that they should call some uninstall routine
626 WARN_IF_OLD_PACKLIST = $(PERL) -lwe "exit unless -f $$ARGV[0];" \\
627 -e "print 'WARNING: I have found an old package in';" \\
628 -e "print ' ', $$ARGV[0], '.';" \\
629 -e "print 'Please make sure the two installations are not conflicting';"
634 MOD_INSTALL = $(PERL) -I$(INST_LIB) -I$(PERL_LIB) -MExtUtils::Install \
635 -e "install({ @ARGV },'$(VERBINST)',0,'$(UNINST)');"
637 DOC_INSTALL = $(PERL) -e "$$\=\"\n\n\";" \
638 -e "print '=head2 ', scalar(localtime), ': C<', shift, '>', ' L<', shift, '>';" \
639 -e "print '=over 4';" \
640 -e "while (defined($$key = shift) and defined($$val = shift)) { print '=item *';print 'C<', \"$$key: $$val\", '>'; }" \
643 UNINSTALL = $(PERL) -MExtUtils::Install \
644 -e "uninstall($$ARGV[0],1,1); print \"\nUninstall is deprecated. Please check the";" \
645 -e "print \" packlist above carefully.\n There may be errors. Remove the\";" \
646 -e "print \" appropriate files manually.\n Sorry for the inconveniences.\n\""
654 Defines suffix rules to go from XS to object files directly. This is
655 only intended for broken make implementations.
659 sub xs_o { # many makes are too dumb to use xs_c then c_o
664 =item top_targets (o)
666 Defines the targets all, subdirs, config, and O_FILES
671 # --- Target Sections ---
676 #all :: config $(INST_PM) subdirs linkext manifypods
680 all :: pure_all htmlifypods manifypods
681 '.$self->{NOECHO}.'$(NOOP)
683 unless $self->{SKIPHASH}{'all'};
686 pure_all :: config pm_to_blib subdirs linkext
687 '.$self->{NOECHO}.'$(NOOP)
689 subdirs :: $(MYEXTLIB)
690 '.$self->{NOECHO}.'$(NOOP)
692 config :: '.$self->{MAKEFILE}.' $(INST_LIBDIR)\.exists
693 '.$self->{NOECHO}.'$(NOOP)
695 config :: $(INST_ARCHAUTODIR)\.exists
696 '.$self->{NOECHO}.'$(NOOP)
698 config :: $(INST_AUTODIR)\.exists
699 '.$self->{NOECHO}.'$(NOOP)
703 config :: Version_check
704 $self->{NOECHO}\$(NOOP)
706 } unless $self->{PARENT} or ($self->{PERL_SRC} && $self->{INSTALLDIRS} eq "perl") or $self->{NO_VC};
708 push @m, $self->dir_target(qw[$(INST_AUTODIR) $(INST_LIBDIR) $(INST_ARCHAUTODIR)]);
710 if (%{$self->{HTMLLIBPODS}}) {
712 config :: \$(INST_HTMLLIBDIR)/.exists
713 $self->{NOECHO}\$(NOOP)
716 push @m, $self->dir_target(qw[$(INST_HTMLLIBDIR)]);
719 if (%{$self->{HTMLSCRIPTPODS}}) {
721 config :: \$(INST_HTMLSCRIPTDIR)/.exists
722 $self->{NOECHO}\$(NOOP)
725 push @m, $self->dir_target(qw[$(INST_HTMLSCRIPTDIR)]);
728 if (%{$self->{MAN1PODS}}) {
730 config :: \$(INST_MAN1DIR)\\.exists
731 $self->{NOECHO}\$(NOOP)
734 push @m, $self->dir_target(qw[$(INST_MAN1DIR)]);
736 if (%{$self->{MAN3PODS}}) {
738 config :: \$(INST_MAN3DIR)\\.exists
739 $self->{NOECHO}\$(NOOP)
742 push @m, $self->dir_target(qw[$(INST_MAN3DIR)]);
746 $(O_FILES): $(H_FILES)
747 ' if @{$self->{O_FILES} || []} && @{$self->{H} || []};
751 perldoc ExtUtils::MakeMaker
756 }.$self->{NOECHO}.q{$(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) \
757 -MExtUtils::MakeMaker=Version_check \
758 -e "Version_check('$(MM_VERSION)')"
764 =item htmlifypods (o)
766 Defines targets and routines to translate the pods into HTML manpages
767 and put them into the INST_HTMLLIBDIR and INST_HTMLSCRIPTDIR
770 Same as MM_Unix version (changes command-line quoting).
775 my($self, %attribs) = @_;
776 return "\nhtmlifypods : pure_all\n\t$self->{NOECHO}\$(NOOP)\n" unless
777 %{$self->{HTMLLIBPODS}} || %{$self->{HTMLSCRIPTPODS}};
780 if (defined $self->{PERL_SRC}) {
781 $pod2html_exe = $self->catfile($self->{PERL_SRC},'pod','pod2html');
783 $pod2html_exe = $self->catfile($Config{scriptdirexp},'pod2html');
785 unless ($pod2html_exe = $self->perl_script($pod2html_exe)) {
786 # No pod2html but some HTMLxxxPODS to be installed
789 Warning: I could not locate your pod2html program. Please make sure,
790 your pod2html program is in your PATH before you execute 'make'
793 $pod2html_exe = "-S pod2html";
797 qq[POD2HTML_EXE = $pod2html_exe\n],
798 qq[POD2HTML = \$(PERL) -we "use File::Basename; use File::Path qw(mkpath); %m=\@ARGV;for (keys %m){" \\\n],
799 q[-e "next if -e $$m{$$_} && -M $$m{$$_} < -M $$_ && -M $$m{$$_} < -M '],
800 $self->{MAKEFILE}, q[';" \\
801 -e "print qq(Htmlifying $$m{$$_}\n);" \\
802 -e "$$dir = dirname($$m{$$_}); mkpath($$dir) unless -d $$dir;" \\
803 -e "system(qq[$$^X ].q["-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" $(POD2HTML_EXE) ].qq[$$_>$$m{$$_}])==0 or warn qq(Couldn\\047t install $$m{$$_}\n);" \\
804 -e "chmod(oct($(PERM_RW))), $$m{$$_} or warn qq(chmod $(PERM_RW) $$m{$$_}: $$!\n);}"
806 push @m, "\nhtmlifypods : pure_all ";
807 push @m, join " \\\n\t", keys %{$self->{HTMLLIBPODS}}, keys %{$self->{HTMLSCRIPTPODS}};
810 if (%{$self->{HTMLLIBPODS}} || %{$self->{HTMLSCRIPTPODS}}) {
811 push @m, "\t$self->{NOECHO}\$(POD2HTML) \\\n\t";
812 push @m, join " \\\n\t", %{$self->{HTMLLIBPODS}}, %{$self->{HTMLSCRIPTPODS}};
819 We don't want manpage process.
825 return "\nmanifypods :\n\t$self->{NOECHO}\$(NOOP)\n";
830 Same as MM_Unix version (changes command-line quoting).
839 $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Manifest=maniread \\
840 -e "@all = keys %{ maniread() };" \\
841 -e "print(\"Executing $(CI) @all\n\"); system(\"$(CI) @all\");" \\
842 -e "print(\"Executing $(RCS_LABEL) ...\n\"); system(\"$(RCS_LABEL) @all\");"
849 Same as MM_Unix version (changes command-line quoting).
857 dist : $(DIST_DEFAULT)
858 }.$self->{NOECHO}.q{$(PERL) -le "print \"Warning: Makefile possibly out of date with $$vf\" if " \
859 -e "-e ($$vf=\"$(VERSION_FROM)\") and -M $$vf < -M \"}.$self->{MAKEFILE}.q{\";"
861 tardist : $(DISTVNAME).tar$(SUFFIX)
863 zipdist : $(DISTVNAME).zip
865 $(DISTVNAME).tar$(SUFFIX) : distdir
868 $(TAR) $(TARFLAGS) $(DISTVNAME).tar $(DISTVNAME)
869 $(RM_RF) $(DISTVNAME)
870 $(COMPRESS) $(DISTVNAME).tar
873 $(DISTVNAME).zip : distdir
875 $(ZIP) $(ZIPFLAGS) $(DISTVNAME).zip $(DISTVNAME)
876 $(RM_RF) $(DISTVNAME)
879 uutardist : $(DISTVNAME).tar$(SUFFIX)
880 uuencode $(DISTVNAME).tar$(SUFFIX) \\
881 $(DISTVNAME).tar$(SUFFIX) > \\
882 $(DISTVNAME).tar$(SUFFIX)_uu
886 $(SHAR) $(DISTVNAME) > $(DISTVNAME).shar
887 $(RM_RF) $(DISTVNAME)
895 Defines the string that is passed to recursive make calls in
902 return "PASTHRU = " . ($NMAKE ? "-nologo" : "");