ext/B/ramblings/flip-flop Compiler ramblings: notes on flip-flop
ext/B/ramblings/magic Compiler ramblings: notes on magic
ext/B/ramblings/reg.alloc Compiler ramblings: register allocation
-ext/B/ramblings/runtime.porting Compiler ramblings: porting PP enging
+ext/B/ramblings/runtime.porting Compiler ramblings: porting PP engine
ext/B/README Compiler backend README
ext/B/t/asmdata.t See if B::Asmdata works
ext/B/t/assembler.t See if B::Assembler, B::Disassembler comply
ext/Encode/Encode/README.e2x Skeleton file for enc2xs
ext/Encode/Encode/_PM.e2x Skeleton file for enc2xs
ext/Encode/Encode/_T.e2x Skeleton file for enc2xs
-ext/Encode/encoding.pm Perl Pragmactic Module
+ext/Encode/encoding.pm Perl Pragmatic Module
ext/Encode/JP/JP.pm Encode extension
ext/Encode/JP/Makefile.PL Encode extension
ext/Encode/KR/KR.pm Encode extension
ext/Storable/t/forgive.t See if Storable works
ext/Storable/t/freeze.t See if Storable works
ext/Storable/t/integer.t See if Storable works
-ext/Storable/t/interwork56.t Test combatibility kludge for 64bit data under 5.6.x
+ext/Storable/t/interwork56.t Test compatibility kludge for 64bit data under 5.6.x
ext/Storable/t/lock.t See if Storable works
ext/Storable/t/make_56_interwork.pl Make test data for interwork56.t
ext/Storable/t/make_downgrade.pl Make test data for downgrade.t
ext/threads/t/basic.t ithreads
ext/threads/t/end.t Test end functions
ext/threads/t/join.t Testing the join function
-ext/threads/t/libc.t testing libc functions for threadsafetyness
+ext/threads/t/libc.t testing libc functions for threadsafety
ext/threads/t/list.t Test threads->list()
ext/threads/t/stress_cv.t Test with multiple threads, coderef cv argument.
ext/threads/t/stress_re.t Test with multiple threads, string cv argument and regexes.
lib/Math/BigInt/t/downgrade.t Test if use Math::BigInt(); under downgrade works
lib/Math/BigInt/t/inf_nan.t Special tests for inf and NaN handling
lib/Math/BigInt/t/isa.t Test for Math::BigInt inheritance
-lib/Math/BigInt/t/mbimbf.inc Actual BigInt/BigFloat accuracy, precicion and fallback, round_mode tests
-lib/Math/BigInt/t/mbimbf.t BigInt/BigFloat accuracy, precicion and fallback, round_mode
+lib/Math/BigInt/t/mbimbf.inc Actual BigInt/BigFloat accuracy, precision and fallback, round_mode tests
+lib/Math/BigInt/t/mbimbf.t BigInt/BigFloat accuracy, precision and fallback, round_mode
lib/Math/BigInt/t/mbi_rand.t Test Math::BigInt randomly
lib/Math/BigInt/t/require.t Test if require Math::BigInt works
lib/Math/BigInt/t/sub_mbf.t Empty subclass test of BigFloat
lib/utf8_heavy.pl Support routines for utf8 pragma
lib/validate.pl Perl library supporting wholesale file mode validation
lib/vars.pm Declare pseudo-imported global variables
-lib/vars.t See if "use vars" work
+lib/vars.t See if "use vars" works
lib/version.pm Support for version objects
lib/version.t Tests for version objects
lib/vmsish.pm Control VMS-specific behavior of Perl core
op.c Opcode syntax tree code
op.h Opcode syntax tree header
opcode.h Automatically generated opcode header
-opcode.pl Opcode header generatore
+opcode.pl Opcode header generator
opnames.h Automatically generated opcode header
os2/Changes Changelog for OS/2 port
os2/diff.configure Patches to Configure
plan9/versnum Plan9 port: script to print version number
pod/buildtoc.PL generate buildtoc which generates perltoc.pod
pod/checkpods.PL Tool to check for common errors in pods
-pod/Makefile.SH generate Makefile whichs makes pods into something else
+pod/Makefile.SH generate Makefile which makes pods into something else
pod/perl.pod Top level perl documentation
pod/perl5004delta.pod Changes from 5.003 to 5.004
pod/perl5005delta.pod Changes from 5.004 to 5.005
pod/perlguts.pod Internals info
pod/perlhack.pod Perl hackers guide
pod/perlhist.pod Perl history info
-pod/perlintern.pod Perl internal function docs (autogenrated)
+pod/perlintern.pod Perl internal function docs (autogenerated)
pod/perlintro.pod Perl introduction for beginners
pod/perliol.pod Internals of PerlIO with layers.
pod/perlipc.pod IPC info
regcomp.h Private declarations for above
regcomp.pl Builder of regnodes.h
regcomp.sym Data for regnodes.h
+regen.pl Common file routines for generator scripts
+regen_headers.pl Run all scripts that (re)generate files
regexec.c Regular expression evaluator
regexp.h Public declarations for the above
regnodes.h Description of nodes of RE engine
t/comp/proto.t See if function prototypes work
t/comp/redef.t See if we get correct warnings on redefined subs
t/comp/require.t See if require works
-t/comp/script.t See if script invokation works
+t/comp/script.t See if script invocation works
t/comp/term.t See if more terms work
-t/comp/use.t See if pragmas work
+t/comp/use.t See if pragmata work
t/harness Finer diagnostics from test suite
t/io/argv.t See if ARGV stuff works
t/io/binmode.t See if binmode() works
vms/ext/DCLsym/Makefile.PL MakeMaker driver for VMS::DCLsym
vms/ext/DCLsym/test.pl regression tests for VMS::DCLsym
vms/ext/Filespec.pm VMS-Unix file syntax interconversion
-vms/ext/filespec.t See if VMS::Filespec funtions work
+vms/ext/filespec.t See if VMS::Filespec functions work
vms/ext/Stdio/0README.txt ReadMe file for VMS::Stdio
vms/ext/Stdio/Makefile.PL MakeMaker driver for VMS::Stdio
vms/ext/Stdio/Stdio.pm VMS options to stdio routines
x2p/a2p.c Output of a2p.y run through byacc
x2p/a2p.h Global declarations
x2p/a2p.pod Pod for awk to perl translator
-x2p/a2p.y A yacc grammer for awk
+x2p/a2p.y A yacc grammar for awk
x2p/a2py.c Awk compiler, sort of
x2p/cflags.SH A script that emits C compilation flags per file
x2p/EXTERN.h Same as above
# warnings.pl: warnings.h lib/warnings.pm
# The correct versions should be already supplied with the perl kit,
# in case you don't have perl available.
-# To force them to be regenerated, type
-# make regen_headers
+# To force them to be regenerated, run
+# perl regen_headers.pl
+# with your existing copy of perl
+# (make regen_headers is kept for backwards compatibility)
AUTOGEN_FILES = keywords.h opcode.h opnames.h pp_proto.h pp.sym proto.h \
embed.h embedvar.h global.sym \
.PHONY: regen_headers regen_pods regen_all
regen_headers: FORCE
- -$(CHMOD_W) $(AUTOGEN_FILES)
- -perl keywords.pl
- -perl opcode.pl
- -perl embed.pl
- -perl bytecode.pl
- -perl regcomp.pl
- -perl warnings.pl
- -perl autodoc.pl
+ -perl regen_headers.pl
regen_pods: FORCE
-cd pod; $(LDLIBPTH) $(MAKE) regen_pods
require 5.003; # keep this compatible, an old perl is all we may have before
# we build the new one
-BEGIN { push @INC, 'lib' } # glob() below requires File::Glob
+BEGIN {
+ push @INC, 'lib';
+ require 'regen.pl';
+} # glob() below requires File::Glob
#
$F = $filename;
}
else {
+ safer_unlink $filename;
open F, ">$filename" or die "Can't open $filename: $!";
$F = \*F;
}
print $F $function->(@args);
}
print $F $trailer if $trailer;
- close $F unless ref $filename;
+ unless (ref $filename) {
+ close $F or die "Error closing $filename: $!";
+ }
}
my %apidocs;
close F or die "Error closing $file: $!\n";
}
-unlink "pod/perlapi.pod";
+safer_unlink "pod/perlapi.pod";
open (DOC, ">pod/perlapi.pod") or
die "Can't create pod/perlapi.pod: $!\n";
_EOE_
-close(DOC);
+close(DOC) or die "Error closing pod/perlapi.pod: $!";
+safer_unlink "pod/perlintern.pod";
open(GUTS, ">pod/perlintern.pod") or
die "Unable to create pod/perlintern.pod: $!\n";
print GUTS <<'END';
END
-close GUTS;
-
+close GUTS or die "Error closing pod/perlintern.pod: $!";
BEGIN {
push @INC, './lib';
+ require 'regen.pl';
}
use strict;
my %alias_to = (
my $perl_header;
($perl_header = $c_header) =~ s{[/ ]?\*/?}{#}g;
-unlink "ext/ByteLoader/byterun.c", "ext/ByteLoader/byterun.h", "ext/B/B/Asmdata.pm";
+safer_unlink "ext/ByteLoader/byterun.c", "ext/ByteLoader/byterun.h", "ext/B/B/Asmdata.pm";
#
# Start with boilerplate for Asmdata.pm
=cut
EOT
+
+close ASMDATA_PM or die "Error closing ASMDATA_PM: $!";
+close BYTERUN_H or die "Error closing BYTERUN_H: $!";
+close BYTERUN_C or die "Error closing BYTERUN_C: $!";
+
__END__
# First set instruction ord("#") to read comment to end-of-line (sneaky)
%number 35
require 5.003; # keep this compatible, an old perl is all we may have before
# we build the new one
+BEGIN {
+ # Get function prototypes
+ require 'regen.pl';
+}
+
#
# See database of global and static function prototypes in embed.fnc
# This is used to generate prototype headers under various configurations,
$F = $filename;
}
else {
- unlink $filename;
+ safer_unlink $filename;
open F, ">$filename" or die "Can't open $filename: $!";
$F = \*F;
}
print $F @outs; # $function->(@args) is not 5.003
}
print $F $trailer if $trailer;
- close $F unless ref $filename;
+ unless (ref $filename) {
+ close $F or die "Error closing $filename: $!";
+ }
}
sub munge_c_files () {
return hide("PL_$pre$sym", "PL_$sym");
}
-unlink 'embed.h';
+safer_unlink 'embed.h';
open(EM, '> embed.h') or die "Can't create embed.h: $!\n";
print EM do_not_edit ("embed.h"), <<'END';
END
-close(EM);
+close(EM) or die "Error closing EM: $!";
-unlink 'embedvar.h';
+safer_unlink 'embedvar.h';
open(EM, '> embedvar.h')
or die "Can't create embedvar.h: $!\n";
#endif /* PERL_POLLUTE */
END
-close(EM);
+close(EM) or die "Error closing EM: $!";
-unlink 'perlapi.h';
-unlink 'perlapi.c';
+safer_unlink 'perlapi.h';
+safer_unlink 'perlapi.c';
open(CAPI, '> perlapi.c') or die "Can't create perlapi.c: $!\n";
open(CAPIH, '> perlapi.h') or die "Can't create perlapi.h: $!\n";
#endif /* __perlapi_h__ */
EOT
-close CAPIH;
+close CAPIH or die "Error closing CAPIH: $!";
print CAPI do_not_edit ("perlapi.c"), <<'EOT';
#endif /* MULTIPLICITY */
EOT
-close(CAPI);
+close(CAPI) or die "Error closing CAPI: $!";
# functions that take va_list* for implementing vararg functions
# NOTE: makedef.pl must be updated if you add symbols to %vfuncs
#!/usr/bin/perl
-unlink "keywords.h";
+require 'regen.pl';
+safer_unlink ("keywords.h");
open(KW, ">keywords.h") || die "Can't create keywords.h: $!\n";
select KW;
print &tab(5, "#define KEY_$keyword"), $keynum++, "\n";
}
+close KW or die "Error closing keywords.h: $!";
+
###########################################################################
sub tab {
local($l, $t) = @_;
#!/usr/bin/perl
+BEGIN {
+ # Get function prototypes
+ require 'regen.pl';
+}
$opcode_new = 'opcode.h-new';
$opname_new = 'opnames.h-new';
close OC or die "Error closing opcode.h: $!";
close ON or die "Error closing opnames.h: $!";
-chmod 0600, 'opcode.h'; # required by dosish filesystems
-chmod 0600, 'opnames.h'; # required by dosish filesystems
-
-# Some dosish systems can't rename over an existing file:
-unlink "$_-old" for qw(opcode.h opnames.h);
-rename $_, "$_-old" for qw(opcode.h opnames.h);
-
-rename $opcode_new, 'opcode.h' or die "renaming opcode.h: $!\n";
-rename $opname_new, 'opnames.h' or die "renaming opnames.h: $!\n";
+foreach ('opcode.h', 'opnames.h') {
+ safer_rename_silent $_, "$_-old";
+}
+safer_rename $opcode_new, 'opcode.h';
+safer_rename $opname_new, 'opnames.h';
$pp_proto_new = 'pp_proto.h-new';
$pp_sym_new = 'pp.sym-new';
close PP or die "Error closing pp_proto.h: $!";
close PPSYM or die "Error closing pp.sym: $!";
-chmod 0600, 'pp_proto.h'; # required by dosish filesystems
-chmod 0600, 'pp.sym'; # required by dosish filesystems
-
-# Some dosish systems can't rename over an existing file:
-unlink "$_-old" for qw(pp_proto.h pp.sym);
-rename $_, "$_-old" for qw(pp_proto.h pp.sym);
-
-rename $pp_proto_new, 'pp_proto.h' or die "rename pp_proto.h: $!\n";
-rename $pp_sym_new, 'pp.sym' or die "rename pp.sym: $!\n";
+foreach ('pp_proto.h', 'pp.sym') {
+ safer_rename_silent $_, "$_-old";
+}
+safer_rename $pp_proto_new, 'pp_proto.h';
+safer_rename $pp_sym_new, 'pp.sym';
###########################################################################
sub tab {
+BEGIN {
+ # Get function prototypes
+ require 'regen.pl';
+}
#use Fatal qw(open close rename chmod unlink);
open DESC, 'regcomp.sym';
$ind = 0;
EOP
-close OUT;
+close OUT or die "close $tmp_h: $!";
-chmod 0666, 'regnodes.h';
-unlink 'regnodes.h';
-rename $tmp_h, 'regnodes.h';
+safer_rename $tmp_h, 'regnodes.h';
--- /dev/null
+#!/usr/bin/perl -w
+use strict;
+use vars qw($Is_W32 $Is_OS2 $Is_Cygwin $Is_NetWare $Needs_Write);
+use Config; # Remember, this is running using an existing perl
+
+# Common functions needed by the regen scripts
+
+$Is_W32 = $^O eq 'MSWin32';
+$Is_OS2 = $^O eq 'os2';
+$Is_Cygwin = $^O eq 'cygwin';
+$Is_NetWare = $Config{osname} eq 'NetWare';
+if ($Is_NetWare) {
+ $Is_W32 = 0;
+}
+
+$Needs_Write = $Is_OS2 || $Is_W32 || $Is_Cygwin || $Is_NetWare;
+
+sub safer_unlink {
+ my @names = @_;
+ my $cnt = 0;
+
+ my $name;
+ foreach $name (@names) {
+ next unless -e $name;
+ chmod 0777, $name if $Needs_Write;
+ ( CORE::unlink($name) and ++$cnt
+ or warn "Couldn't unlink $name: $!\n" );
+ }
+ return $cnt;
+}
+
+sub safer_rename_silent {
+ my ($from, $to) = @_;
+
+ # Some dosish systems can't rename over an existing file:
+ safer_unlink $to;
+ chmod 0600, $from if $Needs_Write;
+ rename $from, $to;
+}
+
+sub safer_rename {
+ my ($from, $to) = @_;
+ safer_rename_silent($from, $to) or die "renaming $from to $to: $!";
+}
+1;
--- /dev/null
+#!/usr/bin/perl -w
+require 5.003; # keep this compatible, an old perl is all we may have before
+ # we build the new one
+
+# The idea is to move the regen_headers target out of the Makefile so that
+# it is possible to rebuild the headers before the Makefile is available.
+# (and the Makefile is unavailable until after Configure is run, and we may
+# wish to make a clean source tree but with current headers without running
+# anything else.
+
+use strict;
+my $perl = $^X;
+
+require 'regen.pl';
+# keep warnings.pl in sync with the CPAN distribution by not requiring core
+# changes
+safer_unlink ("warnings.h", "lib/warnings.pm");
+
+foreach (qw (keywords.pl opcode.pl embed.pl bytecode.pl regcomp.pl
+ warnings.pl autodoc.pl)) {
+ print "$^X $_\n";
+ system "$^X $_";
+}