@INC = 'lib';
$ENV{PERL5LIB} = 'lib';
$Is_VMS = $^O eq 'VMS';
+ $Is_W32 = $^O eq 'MSWin32';
+ $Is_OS2 = $^O eq 'os2';
if ($Is_VMS) { eval 'use VMS::Filespec;' }
}
+$scr_ext = ($Is_VMS ? '.Com' : $Is_W32 ? '.bat' : '');
+
use File::Find;
use File::Compare;
use File::Copy ();
umask 022 unless $Is_VMS;
-@scripts = qw( utils/c2ph utils/h2ph utils/h2xs
- utils/perlbug utils/perldoc utils/pl2pm utils/splain utils/perlcc
+@scripts = qw( utils/c2ph utils/h2ph utils/h2xs utils/perlbug utils/perldoc
+ utils/pl2pm utils/splain utils/perlcc
x2p/s2p x2p/find2perl
pod/pod2man pod/pod2html pod/pod2latex pod/pod2text);
-if ($Is_VMS) { @scripts = map { "$_.Com" } @scripts; }
+if ($scr_ext) { @scripts = map { "$_$scr_ext" } @scripts; }
@pods = (<pod/*.pod>);
-x 'perl' . $exe_ext || die "perl isn't executable!\n";
-x 'suidperl' . $exe_ext|| die "suidperl isn't executable!\n" if $d_dosuid;
--x 't/TEST' || $^O eq 'MSWin32'
+-x 't/TEST' || $Is_W32
|| warn "WARNING: You've never run 'make test'!!!",
" (Installing anyway.)\n";
-if ($^O eq 'MSWin32') {
+if ($Is_W32) {
$perldll = 'perl.' . $dlext;
$perldll = 'perlcore.' . $dlext if $Config{'ccflags'} =~ /PERL_OBJECT/i;
$mainperl_is_instperl = 0;
-if (!$versiononly && !$nonono && $^O ne 'MSWin32' && !$Is_VMS && -t STDIN && -t STDERR
+if (!$versiononly && !$nonono && !$Is_W32 && !$Is_VMS && -t STDIN && -t STDERR
&& -w $mainperldir && ! samepath($mainperldir, $installbin)) {
local($usrbinperl) = "$mainperldir/$perl$exe_ext";
local($instperl) = "$installbin/$perl$exe_ext";
# pstruct should be a link to c2ph
if (! $versiononly) {
- safe_unlink("$installscript/pstruct" . ($Is_VMS ? '.Com' : ''));
+ safe_unlink("$installscript/pstruct$scr_ext");
if ($^O eq 'dos' or $Is_VMS) {
- copy("$installscript/c2ph" . ($Is_VMS ? '.Com' : ''),
- "$installscript/pstruct" . ($Is_VMS ? '.Com' : ''));
+ copy("$installscript/c2ph$scr_ext", "$installscript/pstruct$scr_ext");
} else {
- link("$installscript/c2ph","$installscript/pstruct");
+ link("$installscript/c2ph$scr_ext", "$installscript/pstruct$scr_ext");
}
}
if (!$versiononly) {
- $dirsep = ($^O eq 'os2' || $^O eq 'MSWin32') ? ';' : ':' ;
+ $dirsep = ($Is_OS2 || $Is_W32) ? ';' : ':' ;
($path = $ENV{"PATH"}) =~ s:\\:/:g ;
@path = split(/$dirsep/, $path);
if ($Is_VMS) {
foreach $name (@names) {
next unless -e $name;
- chmod 0777, $name if ($^O eq 'os2' || $^O eq 'MSWin32');
+ chmod 0777, $name if ($Is_OS2 || $Is_W32);
print STDERR " unlink $name\n";
( CORE::unlink($name) and ++$cnt
or warn "Couldn't unlink $name: $!\n" ) unless $nonono;
local @names = @_;
foreach $name (@names) {
next unless -e $name;
- chmod 0777, $name if ($^O eq 'os2' || $^O eq 'MSWin32');
+ chmod 0777, $name if ($Is_OS2 || $Is_W32);
print STDERR " unlink $name\n";
next if CORE::unlink($name);
warn "Couldn't unlink $name: $!\n";
sub samepath {
local($p1, $p2) = @_;
- return (lc($p1) eq lc($p2)) if ($^O eq 'MSWin32');
+ return (lc($p1) eq lc($p2)) if $Is_W32;
if ($p1 ne $p2) {
local($dev1, $ino1, $dev2, $ino2);
my $installlib = $installprivlib;
if ($dir =~ /^auto/ ||
($name =~ /^(.*)\.(?:pm|pod)$/ && $archpms{$1}) ||
- ($name =~ /^(.*)\.(?:h|lib)$/i && $^O eq 'MSWin32')
+ ($name =~ /^(.*)\.(?:h|lib)$/i && $Is_W32)
) {
$installlib = $installarchlib;
return unless $do_installarchlib;
}
copy($from, $to);
# Restore timestamps if it's a .a library or for OS/2.
- if (!$nonono && ($^O eq 'os2' || $to =~ /\.a$/)) {
+ if (!$nonono && ($Is_OS2 || $to =~ /\.a$/)) {
my ($atime, $mtime) = (stat $from)[8,9];
utime $atime, $mtime, $to;
}
all: $(CONVERTERS) man
+converters: $(CONVERTERS)
+
PERL = ../miniperl
REALPERL = ../perl
PL2BAT = bin\pl2bat.pl
GLOBBAT = bin\perlglob.bat
+UTILS = \
+ ..\utils\h2ph \
+ ..\utils\splain \
+ ..\utils\perlbug \
+ ..\utils\pl2pm \
+ ..\utils\c2ph \
+ ..\utils\h2xs \
+ ..\utils\perldoc \
+ ..\utils\pstruct \
+ ..\utils\perlcc \
+ ..\pod\checkpods \
+ ..\pod\pod2html \
+ ..\pod\pod2latex \
+ ..\pod\pod2man \
+ ..\pod\pod2text \
+ ..\x2p\find2perl \
+ ..\x2p\s2p \
+ bin\www.pl \
+ bin\runperl.pl \
+ bin\pl2bat.pl \
+ bin\perlglob.pl \
+ bin\search.pl
+
MAKE = nmake -nologo
CFGSH_TMPL = config.vc
cd ..\..\win32
doc: $(PERLEXE)
- cd ..\pod
- $(MAKE) -f ..\win32\pod.mak checkpods pod2html pod2latex \
- pod2man pod2text
- $(XCOPY) *.bat ..\win32\bin\*.*
- cd ..\win32
copy ..\README.win32 ..\pod\perlwin32.pod
$(PERLEXE) -I..\lib ..\installhtml --podroot=.. --htmldir=./html \
--podpath=pod:lib:ext:utils --htmlroot="file://$(INST_HTML::=|)" \
--libpod=perlfunc:perlguts:perlvar:perlrun:perlop --recurse
-utils: $(PERLEXE)
+utils: $(PERLEXE) $(X2P)
cd ..\utils
$(MAKE) PERL=$(MINIPERL)
- $(PERLEXE) -I..\lib ..\win32\$(PL2BAT) h2ph splain perlbug pl2pm c2ph
- $(PERLEXE) ..\win32\$(PL2BAT) h2xs perldoc pstruct
- $(XCOPY) *.bat ..\win32\bin\*.*
+ cd ..\pod
+ $(MAKE) -f ..\win32\pod.mak converters
cd ..\win32
- $(PERLEXE) $(PL2BAT) bin\network.pl bin\www.pl bin\runperl.pl \
- bin\pl2bat.pl bin\perlglob.pl
+ $(PERLEXE) $(PL2BAT) $(UTILS)
distclean: clean
-del /f $(MINIPERL) $(PERLEXE) $(PERL95EXE) $(PERLDLL) $(GLOBEXE) \
-rmdir /s /q $(AUTODIR) || rmdir /s $(AUTODIR)
-rmdir /s /q $(COREDIR) || rmdir /s $(COREDIR)
-install : all installbare installutils installhtml
+install : all installbare installhtml
-installbare :
+installbare : utils
$(PERLEXE) ..\installperl
$(XCOPY) $(PERL95EXE) $(INST_BIN)\*.*
-
-installutils : utils
$(XCOPY) $(GLOBEXE) $(INST_BIN)\*.*
$(XCOPY) bin\*.bat $(INST_SCRIPT)\*.*
- $(XCOPY) ..\pod\*.bat $(INST_SCRIPT)\*.*
+ $(XCOPY) bin\network.pl $(INST_LIB)\*.*
installhtml : doc
$(RCOPY) html\*.* $(INST_HTML)\*.*
PL2BAT = bin\pl2bat.pl
GLOBBAT = bin\perlglob.bat
+UTILS = \
+ ..\utils\h2ph \
+ ..\utils\splain \
+ ..\utils\perlbug \
+ ..\utils\pl2pm \
+ ..\utils\c2ph \
+ ..\utils\h2xs \
+ ..\utils\perldoc \
+ ..\utils\pstruct \
+ ..\utils\perlcc \
+ ..\pod\checkpods \
+ ..\pod\pod2html \
+ ..\pod\pod2latex \
+ ..\pod\pod2man \
+ ..\pod\pod2text \
+ ..\x2p\find2perl \
+ ..\x2p\s2p \
+ bin\www.pl \
+ bin\runperl.pl \
+ bin\pl2bat.pl \
+ bin\perlglob.pl \
+ bin\search.pl
+
.IF "$(CCTYPE)" == "BORLAND"
CFGSH_TMPL = config.bc
cd $(EXTDIR)\$(*B) && $(MAKE)
doc: $(PERLEXE)
- cd ..\pod && $(MAKE) -f ..\win32\pod.mak checkpods \
- pod2html pod2latex pod2man pod2text
- cd ..\pod && $(XCOPY) *.bat ..\win32\bin\*.*
copy ..\README.win32 ..\pod\perlwin32.pod
$(PERLEXE) -I..\lib ..\installhtml --podroot=.. --htmldir=./html \
--podpath=pod:lib:ext:utils --htmlroot="file://$(INST_HTML:s,:,|,)"\
--libpod=perlfunc:perlguts:perlvar:perlrun:perlop --recurse
-utils: $(PERLEXE)
+utils: $(PERLEXE) $(X2P)
cd ..\utils && $(MAKE) PERL=$(MINIPERL)
- cd ..\utils && $(PERLEXE) ..\win32\$(PL2BAT) h2ph splain perlbug \
- pl2pm c2ph h2xs perldoc pstruct
- $(XCOPY) ..\utils\*.bat bin\*.*
- $(PERLEXE) -I..\lib $(PL2BAT) bin\network.pl bin\www.pl bin\runperl.pl \
- bin\pl2bat.pl bin\perlglob.pl
+ cd ..\pod && $(MAKE) -f ..\win32\pod.mak converters
+ $(PERLEXE) $(PL2BAT) $(UTILS)
distclean: clean
-del /f $(MINIPERL) $(PERLEXE) $(PERL95EXE) $(PERLDLL) $(GLOBEXE) \
-rmdir /s /q $(AUTODIR) || rmdir /s $(AUTODIR)
-rmdir /s /q $(COREDIR) || rmdir /s $(COREDIR)
-install : all installbare installutils installhtml
+install : all installbare installhtml
-installbare :
+installbare : utils
$(PERLEXE) ..\installperl
.IF "$(PERL95EXE)" != ""
$(XCOPY) $(PERL95EXE) $(INST_BIN)\*.*
.ENDIF
-
-installutils : utils
$(XCOPY) $(GLOBEXE) $(INST_BIN)\*.*
$(XCOPY) bin\*.bat $(INST_SCRIPT)\*.*
- $(XCOPY) ..\pod\*.bat $(INST_SCRIPT)\*.*
+ $(XCOPY) bin\network.pl $(INST_LIB)\*.*
installhtml : doc
$(RCOPY) html\*.* $(INST_HTML)\*.*
all: $(CONVERTERS) html
+converters: $(CONVERTERS)
+
PERL = ..\miniperl.exe
-PL2BAT = ..\win32\bin\pl2bat.pl
+REALPERL = ..\perl.exe
POD = \
perl.pod \
perlvar.pod \
perlsub.pod \
perlmod.pod \
+ perlmodlib.pod \
perlform.pod \
perllocale.pod \
perlref.pod \
perlvar.man \
perlsub.man \
perlmod.man \
+ perlmodlib.man \
perlform.man \
perllocale.man \
perlref.man \
perlvar.html \
perlsub.html \
perlmod.html \
+ perlmodlib.html \
perlform.html \
perllocale.html \
perlref.html \
perlvar.tex \
perlsub.tex \
perlmod.tex \
+ perlmodlib.tex \
perlform.tex \
perllocale.tex \
perlref.tex \
tex: pod2latex $(TEX)
toc:
- $(PERL) -I..\lib buildtoc >perltoc.pod
+ $(PERL) -I../lib buildtoc >perltoc.pod
.SUFFIXES: .pm .pod
.SUFFIXES: .man
.pm.man:
- $(PERL) -I..\lib pod2man $*.pm >$*.man
+ $(PERL) -I../lib pod2man $*.pm >$*.man
.pod.man:
- $(PERL) -I..\lib pod2man $*.pod >$*.man
+ $(PERL) -I../lib pod2man $*.pod >$*.man
.SUFFIXES: .html
.pm.html:
- $(PERL) -I..\lib $(POD2HTML) --infile=$*.pm --outfile=$*.html
+ $(PERL) -I../lib $(POD2HTML) --infile=$*.pm --outfile=$*.html
.pod.html:
- $(PERL) -I..\lib $(POD2HTML) --infile=$*.pod --outfile=$*.html
+ $(PERL) -I../lib $(POD2HTML) --infile=$*.pod --outfile=$*.html
.SUFFIXES: .tex
.pm.tex:
- $(PERL) -I..\lib pod2latex $*.pm
+ $(PERL) -I../lib pod2latex $*.pm
.pod.tex:
- $(PERL) -I..\lib pod2latex $*.pod
+ $(PERL) -I../lib pod2latex $*.pod
clean:
- del /f $(MAN) $(HTML) $(TEX)
- del /f pod2html-*cache
- del /f *.aux *.log
+ rm -f $(MAN)
+ rm -f $(HTML)
+ rm -f $(TEX)
+ rm -f pod2html-*cache
+ rm -f *.aux *.log *.exe
realclean: clean
- del /f $(CONVERTERS)
+ rm -f $(CONVERTERS)
distclean: realclean
check: checkpods
@echo "checking..."; \
- $(PERL) -I..\lib checkpods $(POD)
+ $(PERL) -I../lib checkpods $(POD)
# Dependencies.
-pod2latex: pod2latex.PL ..\lib\Config.pm
- $(PERL) -I..\lib pod2latex.PL
- $(PERL) $(PL2BAT) pod2latex
+pod2latex: pod2latex.PL ../lib/Config.pm
+ $(PERL) -I../lib pod2latex.PL
-pod2html: pod2html.PL ..\lib\Config.pm
- $(PERL) -I..\lib pod2html.PL
- $(PERL) $(PL2BAT) pod2html
+pod2html: pod2html.PL ../lib/Config.pm
+ $(PERL) -I ../lib pod2html.PL
-pod2man: pod2man.PL ..\lib\Config.pm
- $(PERL) -I..\lib pod2man.PL
- $(PERL) $(PL2BAT) pod2man
+pod2man: pod2man.PL ../lib/Config.pm
+ $(PERL) -I ../lib pod2man.PL
-pod2text: pod2text.PL ..\lib\Config.pm
- $(PERL) -I..\lib pod2text.PL
- $(PERL) $(PL2BAT) pod2text
+pod2text: pod2text.PL ../lib/Config.pm
+ $(PERL) -I ../lib pod2text.PL
-checkpods: checkpods.PL ..\lib\Config.pm
- $(PERL) -I..\lib checkpods.PL
- $(PERL) $(PL2BAT) checkpods
+checkpods: checkpods.PL ../lib/Config.pm
+ $(PERL) -I ../lib checkpods.PL
+compile: all
+ $(REALPERL) -I../lib ../utils/perlcc -regex 's/$$/.exe/' pod2latex pod2man pod2text checkpods -prog -verbose dcf -log ../compilelog;
+