$!
$ ENDIF !%Config-I-VMS, skip remaining "where install" questions
$!
++$ perl_symbol = "true"
++$ perl_verb = ""
++$ dflt = "y"
++$ IF .NOT.silent
++$ THEN
++$ echo ""
++$ echo "%Config-I-VMS, You may choose to write ''packageup'_SETUP.COM to assign a foreign"
++$ echo "-Config-I-VMS, symbol to invoke ''package', which is the usual method."
++$ echO "-Config-I-VMS, If you do not do so then you would need a DCL command verb at the"
++$ echo "-Config-I-VMS, process or the system wide level."
++$ ENDIF
++$ rp = "Invoke perl as a global symbol foreign command [''dflt'] "
++$ GOSUB myread
++$ IF (.NOT.ans).AND.(ans.NES."") THEN perl_symbol = "false"
++$!
++$ IF (.NOT.perl_symbol)
++$ THEN
++$ dflt = "y"
++$ IF .NOT.silent
++$ THEN
++$ echo ""
++$ echo "%Config-I-VMS, Since you won't be using a symbol you must choose to put the ''packageup'"
++$ echo "-Config-I-VMS, verb in a per-process table or in the system wide DCLTABLES (which"
++$ echo "-Config-I-VMS, would require write privilege)."
++$ ENDIF
++$ rp = "Invoke perl as a per process command verb [ ''dflt' ] "
++$ GOSUB myread
++$ IF (.NOT.ans).AND.(ans.NES."")
++$ THEN perl_verb = "DCLTABLES"
++$ ELSE perl_verb = "PROCESS"
++$ ENDIF
++$ ENDIF ! (.NOT.perl_symbol)
++$!
$!: set the base revision
$ baserev="5"
$!: get the patchlevel
$!
$! %Config-I-VMS, write perl_setup.com here
$!
++$ IF (.NOT.perl_symbol)
++$ THEN
++$ file_2_find = "[-]''packageup'.cld"
++$ echo ""
++$ echo4 "%Config-I-VMS, The perl.cld file is now being written..."
++$ OPEN/WRITE CONFIG 'file_2_find'
++$ IF (use_vmsdebug_perl)
++$ THEN
++$ WRITE CONFIG "define verb dbgperl"
++$ WRITE CONFIG F$FAO("!_!AS","image ''packageup'_root:[000000]dbgperl''ext'")
++$ WRITE CONFIG F$FAO("!_!AS","cliflags (foreign)")
++$ WRITE CONFIG ""
++$ WRITE CONFIG "define verb perl"
++$ WRITE CONFIG F$FAO("!_!AS","image ''packageup'_root:[000000]ndbgPerl''ext'")
++$ WRITE CONFIG F$FAO("!_!AS","cliflags (foreign)")
++$ ELSE
++$ WRITE CONFIG "define verb perl"
++$ WRITE CONFIG F$FAO("!_!AS","image ''packageup'_root:[000000]perl''ext'")
++$ WRITE CONFIG F$FAO("!_!AS","cliflags (foreign)")
++$ ENDIF
++$ CLOSE CONFIG
++$ ENDIF ! (.NOT.perl_symbol)
$ echo ""
$ echo4 "%Config-I-VMS, The perl_setup.com file is now being written..."
$ file_2_find = "[-]perl_setup.com"
$ IF F$LOCATE(".]",prefix) .EQ. F$LENGTH(prefix) THEN -
prefix = prefix - "]" + ".]"
$ WRITE CONFIG "$ define/translation=concealed Perl_Root ''prefix'"
--$ write config "$ ext = "".exe"""
--$ if sharedperl .eqs. "Y"
--$ then
++$ WRITE CONFIG "$ ext = "".exe"""
++$ IF sharedperl .EQS. "Y"
++$ THEN
$ write config "$ if f$getsyi(""ARCH_NAME"") .nes. ""VAX"" then ext = "".AXE"""
--$ endif
--$ IF use_vmsdebug_perl .eqs. "Y"
--$ then
--$ WRITE CONFIG "$ dbgperl :== $Perl_Root:[000000]dbgPerl'ext'"
--$ WRITE CONFIG "$ perl :== $Perl_Root:[000000]ndbgPerl'ext'"
--$ WRITE CONFIG "$ define dbgPerlShr Perl_Root:[000000]dbgPerlShr'ext'"
--$ else
--$ WRITE CONFIG "$ perl :== $Perl_Root:[000000]Perl'ext'"
--$ WRITE CONFIG "$ define PerlShr Perl_Root:[000000]PerlShr'ext'"
--$ endif
++$ ENDIF
++$ IF (perl_symbol)
++$ THEN
++$ IF (use_vmsdebug_perl)
++$ THEN
++$ WRITE CONFIG "$ dbgperl :== $Perl_Root:[000000]dbgPerl'ext'"
++$ WRITE CONFIG "$ perl :== $Perl_Root:[000000]ndbgPerl'ext'"
++$ WRITE CONFIG "$ define dbgPerlShr Perl_Root:[000000]dbgPerlShr'ext'"
++$ ELSE
++$ WRITE CONFIG "$ perl :== $Perl_Root:[000000]Perl'ext'"
++$ WRITE CONFIG "$ define PerlShr Perl_Root:[000000]PerlShr'ext'"
++$ ENDIF
++$ ELSE ! .NOT.perl_symbol
++$ IF (use_vmsdebug_perl)
++$ THEN
++$ WRITE CONFIG "$ define dbgPerlShr Perl_Root:[000000]dbgPerlShr'ext'"
++$ ELSE
++$ WRITE CONFIG "$ define PerlShr Perl_Root:[000000]PerlShr'ext'"
++$ ENDIF
++$ IF perl_verb .EQS. "PROCESS"
++$ THEN
++$ WRITE CONFIG "$ set command ''packagup'_ROOT:[000000]''packageup'.CLD"
++$ ENDIF
++$ ENDIF ! perl_symbol
$ WRITE CONFIG "$ define/nolog pod2text Perl_Root:[lib.pod]pod2text.com"
$ WRITE CONFIG "$ define/nolog pod2html Perl_Root:[lib.pod]pod2html.com"
$ WRITE CONFIG "$ define/nolog pod2man Perl_Root:[lib.pod]pod2man.com"
$ WRITE CONFIG "$!"
$ WRITE CONFIG "$! Symbols for commonly used scripts:"
$ WRITE CONFIG "$!"
--$ WRITE CONFIG "$ Perldoc == ""'"+"'Perl' Perl_Root:[lib.pod]Perldoc.com -t"""
--$ WRITE CONFIG "$ pod2text == ""'"+"'Perl' pod2text"""
--$ WRITE CONFIG "$ pod2html == ""'"+"'Perl' pod2html"""
--$ WRITE CONFIG "$!pod2man == ""'"+"'Perl' pod2man"""
--$ WRITE CONFIG "$!Perlbug == ""'"+"'Perl' Perl_Root:[lib]Perlbug.com"""
--$ WRITE CONFIG "$!c2ph == ""'"+"'Perl' c2ph"""
--$ WRITE CONFIG "$!h2ph == ""'"+"'Perl' h2ph"""
--$ WRITE CONFIG "$!h2xs == ""'"+"'Perl' h2xs"""
++$ IF (perl_symbol)
++$ THEN
++$ WRITE CONFIG "$ Perldoc == ""'"+"'Perl' Perl_Root:[lib.pod]Perldoc.com -t"""
++$ WRITE CONFIG "$ pod2text == ""'"+"'Perl' pod2text"""
++$ WRITE CONFIG "$ pod2html == ""'"+"'Perl' pod2html"""
++$ WRITE CONFIG "$ pod2latex == ""'"+"'Perl' Perl_Root:[lib.pod]pod2latex.com"""
++$ WRITE CONFIG "$!pod2man == ""'"+"'Perl' pod2man"""
++$ WRITE CONFIG "$!Perlbug == ""'"+"'Perl' Perl_Root:[lib]Perlbug.com"""
++$ WRITE CONFIG "$ c2ph == ""'"+"'Perl' Perl_Root:[utils]c2ph.com"""
++$ IF F$LOCATE("Devel::DProf",extensions) .LT. F$LENGTH(extensions)
++$ THEN
++$ WRITE CONFIG "$ dprofpp == ""'"+"'Perl' Perl_Root:[utils]dprofpp.com"""
++$ ENDIF
++$ WRITE CONFIG "$ h2ph == ""'"+"'Perl' Perl_Root:[utils]h2ph.com"""
++$ WRITE CONFIG "$ h2xs == ""'"+"'Perl' Perl_Root:[utils]h2xs.com"""
++$ WRITE CONFIG "$!perlcc == ""'"+"'Perl' Perl_Root:[utils]perlcc.com"""
++$ WRITE CONFIG "$ splain == ""'"+"'Perl' Perl_Root:[utils]splain.com"""
++$ ELSE
++$ WRITE CONFIG "$ Perldoc == ""Perl Perl_Root:[lib.pod]Perldoc.com -t"""
++$ WRITE CONFIG "$ pod2text == ""Perl pod2text"""
++$ WRITE CONFIG "$ pod2html == ""Perl pod2html"""
++$ WRITE CONFIG "$ pod2latex == ""Perl Perl_Root:[lib.pod]pod2latex.com"""
++$ WRITE CONFIG "$!pod2man == ""Perl pod2man"""
++$ WRITE CONFIG "$!Perlbug == ""Perl Perl_Root:[lib]Perlbug.com"""
++$ WRITE CONFIG "$ c2ph == ""Perl Perl_Root:[utils]c2ph.com"""
++$ IF F$LOCATE("Devel::DProf",extensions) .LT. F$LENGTH(extensions)
++$ THEN
++$ WRITE CONFIG "$ dprofpp == ""Perl Perl_Root:[utils]dprofpp.com"""
++$ ENDIF
++$ WRITE CONFIG "$ h2ph == ""Perl Perl_Root:[utils]h2ph.com"""
++$ WRITE CONFIG "$ h2xs == ""Perl Perl_Root:[utils]h2xs.com"""
++$ WRITE CONFIG "$!perlcc == ""Perl Perl_Root:[utils]perlcc.com"""
++$ WRITE CONFIG "$ splain == ""Perl Perl_Root:[utils]splain.com"""
++$ ENDIF
$ CLOSE CONFIG
$!
$ echo ""
$ echo "-Config-I-VMS, when you are satisfied with a successful compilation,"
$ echo "-Config-I-VMS, testing, and installation of your perl."
$ echo ""
++$ IF ((.NOT.perl_symbol) .AND. (perl_verb .EQS. "DCLTABLES"))
++$ THEN
++$ file_2_find = "[-]''packageup'_install.com"
++$ OPEN/WRITE CONFIG 'file_2_find
++$ WRITE CONFIG "$ set command perl /table=sys$common:[syslib]dcltables.exe -"
++$ WRITE CONFIG " /output=sys$common:[syslib]dcltables.exe"
++$ WRITE CONFIG "$ install replace sys$common:[syslib]dcltables.exe"
++$ CLOSE CONFIG
++$ echo4 ""
++$ echo4 "%Config-I-VMS, In order to install the ''packageup' verb into DCLTABLES run:"
++$ echo4 "-Config-I-VMS, @ ''F$SEARCH(file_2_find)'"
++$ echo4 "-Config-I-VMS, after a successful build, test, and install. Do so with CMKRNL privilege."
++$ echo4 ""
++$ ENDIF
$!
$!figure out where we "are" by parsing 'vms_default_directory_name'
$!
perlfork Perl fork() information
perlthrtut Perl threads tutorial
perllexwarn Perl warnings and their control
++ perlfilter Perl source filters
perldbmfilter Perl DBM filters
perlcompile Perl compiler suite intro
=head2 VMS
--[TODO - Charles Bailey <bailey@newman.upenn.edu>]
++Numerous revisions and extensions to configuration, build, testing, and
++installation process to accomodate core changes and VMS-specific options
++
++Expand %ENV-handling code to allow runtime mapping to logical names,
++CLI symbols, and CRTL environ array
++
++Extension of subprocess invocation code to accept filespecs as command "verbs"
++
++Add to Perl command line processing the ability to use default file types and
++to recognize Unix-style C<2E<gt>&1>.
++
++Expansion of File::Spec::VMS routines, and integration into ExtUtils::MM_VMS
++
++Extension of ExtUtils::MM_VMS to handle complex extensions more flexibly
++
++Barewords at start of Unix-syntax paths may be treated as text rather than
++only as logical names
++
++Optional secure translation of several logical names used internally by Perl
++
++Miscellaneous bugfixing and porting of new core code to VMS
++
++Thanks are gladly extended to the many people who have contributed VMS
++patches, testing, and ideas.
=head2 Win32
$origdir = cwd;
chdir(dirname($0));
($file = basename($0)) =~ s/\.PL$//;
--$file =~ s/\.pl$//
-- if ($^O eq 'VMS' or $^O eq 'os2' or $^O eq 'dos'); # "case-forgiving"
++$file =~ s/\.pl$// if ($^O eq 'os2' or $^O eq 'dos'); # "case-forgiving"
++$file =~ s/\.pl$/.com/ if ($^O eq 'VMS'); # "case-forgiving"
open OUT,">$file" or die "Can't create $file: $!";
$origdir = cwd;
chdir(dirname($0));
($file = basename($0)) =~ s/\.PL$//;
--$file =~ s/\.pl$//
-- if ($^O eq 'VMS' or $^O eq 'os2' or $^O eq 'dos'); # "case-forgiving"
++$file =~ s/\.pl$// if ($^O eq 'os2' or $^O eq 'dos'); # "case-forgiving"
++$file =~ s/\.pl$/.com/ if ($^O eq 'VMS'); # "case-forgiving"
open OUT,">$file" or die "Can't create $file: $!";
# This is so that make depend always knows where to find PL derivatives.
chdir(dirname($0));
($file = basename($0)) =~ s/\.PL$//;
--$file =~ s/\.pl$//
-- if ($Config{'osname'} eq 'VMS' or
-- $Config{'osname'} eq 'OS2'); # "case-forgiving"
++$file =~ s/\.pl$// if ($Config{'osname'} eq 'OS2'); # "case-forgiving"
++$file =~ s/\.pl$/.com/ if ($Config{'osname'} eq 'VMS'); # "case-forgiving"
my $dprof_pm = '../ext/Devel/DProf/DProf.pm';
my $VERSION = 0;
@ $(NOOP)
utils : $(utils1) $(utils2)
@ $(NOOP)
--podxform : [.lib.pod]pod2text.com [.lib.pod]pod2html.com [.lib.pod]pod2latex.com [.lib.pod]pod2man.com [.lib.pod]podchecker.com
++podxform : [.lib.pod]pod2text.com [.lib.pod]pod2html.com [.lib.pod]pod2latex.com [.lib.pod]pod2man.com [.lib.pod]podchecker.com [.lib.pod]pod2usage.com [.lib.pod]podselect.com
@ $(NOOP)
x2p : [.x2p]a2p$(E) [.x2p]s2p.com [.x2p]find2perl.com
@ $(NOOP)
$(MINIPERL) $(MMS$SOURCE)
Copy/Log [.pod]podchecker.com $(MMS$TARGET)
++[.lib.pod]pod2usage.com : [.pod]pod2usage.PL $(ARCHDIR)Config.pm
++ @ If F$Search("[.lib]pod.dir").eqs."" Then Create/Directory [.lib.pod]
++ $(MINIPERL) $(MMS$SOURCE)
++ Copy/Log [.pod]pod2usage.com $(MMS$TARGET)
++
++[.lib.pod]podselect.com : [.pod]podselect.PL $(ARCHDIR)Config.pm
++ @ If F$Search("[.lib]pod.dir").eqs."" Then Create/Directory [.lib.pod]
++ $(MINIPERL) $(MMS$SOURCE)
++ Copy/Log [.pod]podselect.com $(MMS$TARGET)
++
preplibrary : $(MINIPERL_EXE) $(LIBPREREQ) $(SOCKPM)
@ Write Sys$Output "Autosplitting Perl library . . ."
@ Create/Directory [.lib.auto]
/some/where/over/the.rainbow vmsify some:[where.over]the.rainbow
some/where/over/the.rainbow vmsify [.some.where.over]the.rainbow
../some/where/over/the.rainbow vmsify [-.some.where.over]the.rainbow
--some/../../where/over/the.rainbow vmsify [-.where.over]the.rainbow
++some/../../where/over/the.rainbow vmsify [.some.--.where.over]the.rainbow
.../some/where/over/the.rainbow vmsify [...some.where.over]the.rainbow
some/.../where/over/the.rainbow vmsify [.some...where.over]the.rainbow
/some/.../where/over/the.rainbow vmsify some:[...where.over]the.rainbow
print "opcode.h>> $_" if $debug > 2;
if (/^OP \*\s/) { &scan_func($_); }
if (/^\s*EXT/) { &scan_var($_); }
-- if (/^\s+OP_/) { &scan_enum($_); }
-- last LINE unless defined($_ = <CPP>);
-- }
-- while (/^typedef enum/ .. /^\s*\}/) {
-- print "global enum>> $_" if $debug > 2;
-- &scan_enum($_);
last LINE unless defined($_ = <CPP>);
}
# Check for transition to new header file
the command line is treated as the filespec of an image to
run, and an attempt is made to invoke it (using F<.Exe> and
the process defaults to expand the filespec) and pass the
--rest of C<exec>'s argument to it as parameters.
++rest of C<exec>'s argument to it as parameters. If the token
++has no file type, and matches a file with null type, then an
++attempt is made to determine whether the file is an executable
++image which should be invoked using C<MCR> or a text file which
++should be passed to DCL as a command procedure.
You can use C<exec> in both ways within the same script, as
long as you call C<fork> and C<exec> in pairs. Perl
using a default type of F<.Exe> and the process defaults, and if
successful, the resulting file is invoked via C<MCR>. This allows you
to invoke an image directly simply by passing the file specification
--to C<system>, a common Unixish idiom. If LIST consists
--of the empty string, C<system> spawns an interactive DCL subprocess,
--in the same fashion as typiing B<SPAWN> at the DCL prompt.
++to C<system>, a common Unixish idiom. If the token has no file type,
++and matches a file with null type, then an attempt is made to
++determine whether the file is an executable image which should be
++invoked using C<MCR> or a text file which should be passed to DCL
++as a command procedure.
++
++If LIST consists of the empty string, C<system> spawns an
++interactive DCL subprocess, in the same fashion as typiing
++B<SPAWN> at the DCL prompt.
++
Perl waits for the subprocess to complete before continuing
execution in the current process. As described in L<perlfunc>,
the return value of C<system> is a fake "status" which follows
$ WC "d_llseek='" + perl_d_llseek + "'"
$ WC "d_iconv='" + perl_d_iconv +"'"
$ WC "i_iconv='" + perl_i_iconv +"'"
--$ WC "inc_version_list_init='""""'"
++$ WC "inc_version_list_init='0'"
$ WC "uselargefiles='" + perl_uselargefiles + "'"
$ WC "uselongdouble='" + perl_uselongdouble + "'"
$ WC "usemorebits='" + perl_usemorebits + "'"
info = open_pipes;
while (info) {
++ int need_eof;
_ckvmssts(SYS$SETAST(0));
need_eof = info->mode != 'r' && !info->done;
_ckvmssts(SYS$SETAST(1));
exit(vaxc$errno);
}
if (err != NULL) {
++ if (strcmp(err,"&1") == 0) {
++ dup2(fileno(stdout), fileno(Perl_debug_log));
++ } else {
FILE *tmperr;
if (NULL == (tmperr = fopen(err, errmode, "mbc=32", "mbf=2")))
{
exit(vaxc$errno);
}
}
++ }
#ifdef ARGPROC_DEBUG
PerlIO_printf(Perl_debug_log, "Arglist:\n");
for (j = 0; j < *ac; ++j)
{
char vmsspec[NAM$C_MAXRSS+1], resspec[NAM$C_MAXRSS+1];
$DESCRIPTOR(defdsc,".EXE");
++ $DESCRIPTOR(defdsc2,".");
$DESCRIPTOR(resdsc,resspec);
struct dsc$descriptor_s imgdsc = {0, DSC$K_DTYPE_T, DSC$K_CLASS_S, 0};
unsigned long int cxt = 0, flags = 1, retsts = SS$_NORMAL;
imgdsc.dsc$a_pointer = s;
imgdsc.dsc$w_length = wordbreak - s;
retsts = lib$find_file(&imgdsc,&resdsc,&cxt,&defdsc,0,0,&flags);
++ if (!(retsts&1)) {
++ _ckvmssts(lib$find_file_end(&cxt));
++ retsts = lib$find_file(&imgdsc,&resdsc,&cxt,&defdsc2,0,0,&flags);
if (!(retsts & 1) && *s == '$') {
++ _ckvmssts(lib$find_file_end(&cxt));
imgdsc.dsc$a_pointer++; imgdsc.dsc$w_length--;
retsts = lib$find_file(&imgdsc,&resdsc,&cxt,&defdsc,0,0,&flags);
++ if (!(retsts&1)) {
_ckvmssts(lib$find_file_end(&cxt));
++ retsts = lib$find_file(&imgdsc,&resdsc,&cxt,&defdsc2,0,0,&flags);
++ }
}
++ }
++ _ckvmssts(lib$find_file_end(&cxt));
++
if (retsts & 1) {
++ FILE *fp;
s = resspec;
while (*s && !isspace(*s)) s++;
*s = '\0';
++
++ /* check that it's really not DCL with no file extension */
++ fp = fopen(resspec,"r","ctx=bin,shr=get");
++ if (fp) {
++ char b[4] = {0,0,0,0};
++ read(fileno(fp),b,4);
++ isdcl = isprint(b[0]) && isprint(b[1]) && isprint(b[2]) && isprint(b[3]);
++ fclose(fp);
++ }
++ if (check_img && isdcl) return RMS$_FNF;
++
if (cando_by_name(S_IXUSR,0,resspec)) {
New(402,VMScmd.dsc$a_pointer,7 + s - resspec + (rest ? strlen(rest) : 0),char);
++ if (!isdcl) {
strcpy(VMScmd.dsc$a_pointer,"$ MCR ");
++ } else {
++ strcpy(VMScmd.dsc$a_pointer,"@");
++ }
strcat(VMScmd.dsc$a_pointer,resspec);
if (rest) strcat(VMScmd.dsc$a_pointer,rest);
VMScmd.dsc$w_length = strlen(VMScmd.dsc$a_pointer);
#define HAS_WAIT
#define PERL_FS_VER_FMT "%d_%d_%d"
++/* Temporary; we need to add support for this to Configure.Com */
++#ifdef PERL_INC_VERSION_LIST
++# undef PERL_INC_VERSION_LIST
++#endif
/* VMS:
* This symbol, if defined, indicates that the program is running under