From: Craig A. Berry Date: Wed, 4 Jul 2007 15:18:06 +0000 (+0000) Subject: Remove vms/genconfig.pl and references to it; it was made obsolete way back X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=bf12dbb57a997013e557089ab6cdb2a89170ece0;p=p5sagit%2Fp5-mst-13.2.git Remove vms/genconfig.pl and references to it; it was made obsolete way back in change #1084. Remove references to vms/config.vms, which was removed in change #1084. p4raw-link: @1084 on //depot/perl: 97abc6adffcd3efcbaee73cbdad2055b2d06be4f p4raw-id: //depot/perl@31532 --- diff --git a/MANIFEST b/MANIFEST index a9bdfa4..a134634 100644 --- a/MANIFEST +++ b/MANIFEST @@ -3962,7 +3962,6 @@ vms/ext/Stdio/Stdio.pm VMS options to stdio routines vms/ext/Stdio/Stdio.xs VMS options to stdio routines vms/ext/Stdio/test.pl regression tests for VMS::Stdio vms/ext/XSSymSet.pm manage linker symbols when building extensions -vms/genconfig.pl retcon config.sh from config.h vms/genopt.com hack to write options files in case of broken makes vms/gen_shrfls.pl generate options files and glue for shareable image vms/make_command.com record MM[SK] command used to build Perl diff --git a/README.vms b/README.vms index 2c6a6b2..87402eb 100644 --- a/README.vms +++ b/README.vms @@ -268,10 +268,6 @@ inappropriate changes to configure.com or config_h.SH can render perl unbuildable; odds are that there's nothing in there you'll need to change. -The one exception is the various *DIR install locations. Changing those -requires changes in genconfig.pl as well. Be really careful if you need to -change these, as they can cause some fairly subtle problems. - =head2 Socket Support (optional) for Perl on VMS Perl includes a number of functions for IP sockets, which are available if diff --git a/configure.com b/configure.com index b6c923d..67251ac 100644 --- a/configure.com +++ b/configure.com @@ -870,7 +870,7 @@ $! $!: Try to determine whether config.sh was made on this system $!: Get old answers from old config file if Configure was run on the $!: same system, otherwise use the hints. -$ config_sh_es = "''config_sh'/[-]config.sh/[-.vms]config.vms/" +$ config_sh_es = "''config_sh'/[-]config.sh/" $ i = 0 $ max = 3 $Config_sh_look: @@ -882,7 +882,6 @@ $ configshfound = F$SEARCH(config_sh) $ IF (configshfound.NES."") THEN GOTO Config_sh_found $ ENDIF $ IF (i.LT.max) THEN GOTO Config_sh_look -$! genconfig.pl has "osname='VMS'" $ osname = F$EDIT(F$GETSYI("NODE_SWTYPE"),"COLLAPSE") $ IF (configshfound.EQS."") $ THEN @@ -1128,7 +1127,6 @@ $ tz = f$fao("UTC!AS!UL:!2ZL",signothetime,tzhour,tzminrem) $ cf_time = "''wkday' ''mon' ''mday' ''hour':''min':''sec' ''tz' ''year'" $! $!: determine the architecture name -$! genconfig.pl has either archname='VMS_AXP' or 'VMS_VAX' $! Note that DCL in VMS V5.4 does not have F$GETSYI("ARCH_NAME") $! but does have F$GETSYI("HW_MODEL"). $! Please try to use either archname .EQS. "VMS_VAX" or archname .EQS. @@ -2929,8 +2927,6 @@ $ rp="What pager is used on your system? [''dflt'] " $ GOSUB myread $ pager = ans $! -$! update [.vms]config.vms here -$! $! update makefile here $! echo4 "Updating makefile..." $! diff --git a/vms/genconfig.pl b/vms/genconfig.pl deleted file mode 100644 index 02a2ea3..0000000 --- a/vms/genconfig.pl +++ /dev/null @@ -1,424 +0,0 @@ -#!/usr/bin/perl -# Habit . . . -# -# Extract info from Config.VMS, and add extra data here, to generate Config.sh -# Edit the static information after __END__ to reflect your site and options -# that went into your perl binary. In addition, values which change from run -# to run may be supplied on the command line as key=val pairs. -# -# Rev. 16-Feb-1998 Charles Bailey bailey@newman.upenn.edu -# - -#==== Locations of installed Perl components -$prefix='perl_root'; -$builddir="$prefix:[000000]"; -$installbin="$prefix:[000000]"; -$installscript="$prefix:[000000]"; -$installman1dir="$prefix:[man.man1]"; -$installman3dir="$prefix:[man.man3]"; -$installprivlib="$prefix:[lib]"; -$installsitelib="$prefix:[lib.site_perl]"; - -unshift(@INC,'lib'); # In case someone didn't define Perl_Root - # before the build - -if ($ARGV[0] eq '-f') { - open(ARGS,$ARGV[1]) or die "Can't read data from $ARGV[1]: $!\n"; - @ARGV = (); - while () { - chomp; - push(@ARGV,split(/\|/,$_)); - } - close ARGS; -} - -if (-f "config.vms") { $infile = "config.vms"; $outdir = "[-]"; } -elsif (-f "[.vms]config.vms") { $infile = "[.vms]config.vms"; $outdir = "[]"; } -elsif (-f "config.h") { $infile = "config.h"; $outdir = "[]";} - -if ($infile) { print "Generating Config.sh from $infile . . .\n"; } -else { die <${outdir}Config.sh") || die "Can't open ${outdir}Config.sh: $!\n"; - -$time = localtime; -$cf_by = (getpwuid($<))[0]; -$archsufx = `Write Sys\$Output F\$GetSyi("HW_MODEL")` > 1024 ? 'AXP' : 'VAX'; -($vers = $]) =~ tr/./_/; -$installarchlib = VMS::Filespec::vmspath($installprivlib); -$installarchlib =~ s#\]#.VMS_$archsufx.$vers\]#; -$installsitearch = VMS::Filespec::vmspath($installsitelib); -$installsitearch =~ s#\]#.VMS_$archsufx\]#; -($osvers = `Write Sys\$Output F\$GetSyi("VERSION")`) =~ s/^V?(\S+)\s*\n?$/$1/; - -print OUT <= 5.2 and $vmsver >= 7) { $rtlnew = 'define'; } - else { $rtlnew = 'undef'; } - } - else { $rtlhas = $rtlnew = 'undef'; print OUT "useposix='false'\n"; } - foreach (qw[ d_stdstdio d_stdio_ptr_lval d_stdio_cnt_lval d_stdiobase - d_locconv d_setlocale i_locale d_mbstowcs d_mbtowc - d_wcstombs d_wctomb d_mblen d_mktime d_strcoll d_strxfrm ]) { - print OUT "$_='$rtlhas'\n"; - } - print OUT "d_stdio_ptr_lval_sets_cnt='undef'\n"; - print OUT "d_stdio_ptr_lval_nochange_cnt='undef'\n"; - foreach (qw[ d_gettimeod d_uname d_truncate d_wait4 d_index - d_pathconf d_fpathconf d_sysconf d_sigsetjmp ]) { - print OUT "$_='$rtlnew'\n"; - } - next; - } - elsif ($key eq 'exe_ext') { - my($nodot) = $val; - $nodot =~ s!\.!!; - print OUT "so='$nodot'\ndlext='$nodot'\n"; - } - elsif ($key eq 'obj_ext') { print OUT "dlobj='dl_vms$val'\n"; } - print OUT "$key='$val'\n"; -} - -# Are there any other logicals which TCP/IP stacks use for the host name? -$myname = $ENV{'ARPANET_HOST_NAME'} || $ENV{'INTERNET_HOST_NAME'} || - $ENV{'MULTINET_HOST_NAME'} || $ENV{'UCX$INET_HOST'} || - $ENV{'TCPWARE_DOMAINNAME'} || $ENV{'NEWS_ADDRESS'}; -if (!$myname) { - ($myname) = `hostname` =~ /^(\S+)/; - if ($myname =~ /IVVERB/) { - warn "Can't determine TCP/IP hostname" if $dosock; - $myname = ''; - } -} -$myname = $ENV{'SYS$NODE'} unless $myname; -($myhostname,$mydomain) = split(/\./,$myname,2); -print OUT "myhostname='$myhostname'\n" if $myhostname; -if ($mydomain) { - print OUT "mydomain='.$mydomain'\n"; - print OUT "perladmin='$cf_by\@$myhostname.$mydomain'\n"; - print OUT "cf_email='$cf_by\@$myhostname.$mydomain'\n"; -} -else { - print OUT "perladmin='$cf_by'\n"; - print OUT "cf_email='$cf_by'\n"; -} -chomp($hwname = `Write Sys\$Output F\$GetSyi("HW_NAME")`); -$hwname = $archsufx if $hwname =~ /IVKEYW/; # *really* old VMS version -print OUT "myuname='VMS $myname $osvers $hwname'\n"; - -# Before we read the C header file, find out what config.sh constants are -# equivalent to the C preprocessor macros -if (open(SH,"${outdir}config_h.SH")) { - while () { - next unless m%^#(?!if).*\$%; - s/^#//; s!(.*?)\s*/\*.*!$1!; - my(@words) = split; - $words[1] =~ s/\(.*//; # Clip off args from macro - # Did we use a shell variable for the preprocessor directive? - if ($words[0] =~ m!^\$(\w+)!) { $pp_vars{$words[1]} = $1; } - if (@words > 2) { # We may also have a shell var in the value - shift @words; # Discard preprocessor directive - my($token) = shift @words; # and keep constant name - my($word); - foreach $word (@words) { - next unless $word =~ m!\$(\w+)!; - $val_vars{$token} = $1; - last; - } - } - } - close SH; -} -else { warn "Couldn't read ${outdir}config_h.SH: $!\n"; } -$pp_vars{UNLINK_ALL_VERSIONS} = 'd_unlink_all_versions'; # VMS_specific - -# OK, now read the C header file, and retcon statements into config.sh -while () { # roll through the comment header in Config.VMS - last if /config-start/; -} - -while () { - chop; - while (/\\\s*$/) { # pick up contination lines - my $line = $_; - $line =~ s/\\\s*$//; - $_ = ; - s/^\s*//; - $_ = $line . $_; - } - next unless my ($blocked,$un,$token,$val) = - m%^(\/\*)?\s*\#\s*(un)?def\w*\s+([A-Za-z0-9]\w+)\S*\s*(.*)%; - if (/config-skip/) { - delete $pp_vars{$token} if exists $pp_vars{$token}; - delete $val_vars{$token} if exists $val_vars{$token}; - next; - } - $val =~ s!\s*/\*.*!!; # strip off trailing comment - my($had_val); # Maybe a macro with args that we just #undefd or commented - if (!length($val) and $val_vars{$token} and ($un || $blocked)) { - print OUT "$val_vars{$token}=''\n" unless exists $done{$val_vars{$token}}; - $done{$val_vars{$token}}++; - delete $val_vars{$token}; - $had_val = 1; - } - $state = ($blocked || $un) ? 'undef' : 'define'; - if ($pp_vars{$token}) { - print OUT "$pp_vars{$token}='$state'\n" unless exists $done{$pp_vars{$token}}; - $done{$pp_vars{$token}}++; - delete $pp_vars{$token}; - } - elsif (not length $val and not $had_val) { - # Wups -- should have been shell var for C preprocessor directive - warn "Constant $token not found in config_h.SH\n"; - $token = lc $token; - $token = "d_$token" unless $token =~ /^i_/; - print OUT "$token='$state'\n"; - } - next unless length $val; - $val =~ s/^"//; $val =~ s/"$//; # remove end quotes - $val =~ s/","/ /g; # make signal list look nice - # Library directory; convert to VMS syntax - $val = VMS::Filespec::vmspath($val) if ($token =~ /EXP$/); - if ($val_vars{$token}) { - print OUT "$val_vars{$token}='$val'\n" unless exists $done{$val_vars{$token}}; - if ($val_vars{$token} =~ s/exp$//) { - print OUT "$val_vars{$token}='$val'\n" unless exists $done{$val_vars{$token}};; - } - $done{$val_vars{$token}}++; - delete $val_vars{$token}; - } - elsif (!$pp_vars{$token}) { # Haven't seen it previously, either - warn "Constant $token not found in config_h.SH (val=|$val|)\n"; - $token = lc $token; - print OUT "$token='$val'\n"; - if ($token =~ s/exp$//) {print OUT "$token='$val'\n";} - } -} -close IN; -# Special case -- preprocessor manifest "VMS" is defined automatically -# on VMS systems, but is also used erroneously by the Perl build process -# as the manifest for the obsolete variable $d_eunice. -print OUT "d_eunice='undef'\n"; delete $pp_vars{VMS}; - -# XXX temporary -- USE_5005THREADS is currently on CC command line -delete $pp_vars{'USE_5005THREADS'}; - -foreach (sort keys %pp_vars) { - warn "Didn't see $_ in $infile\n"; -} -foreach (sort keys %val_vars) { - warn "Didn't see $_ in $infile(val)\n"; -} - -if (open(OPT,"${outdir}crtl.opt")) { - while () { - next unless m#/(sha|lib)#i; - chomp; - if (/crtl/i || /gcclib/i) { push(@crtls,$_); } - else { push(@libs,$_); } - } - close OPT; - print OUT "libs='",join(' ',@libs),"'\n"; - push(@crtls,'(DECCRTL)') if $cctype eq 'decc'; - print OUT "libc='",join(' ',@crtls),"'\n"; -} -else { warn "Can't read ${outdir}crtl.opt - skipping 'libs' & 'libc'"; } - -if (open(PL,"${outdir}patchlevel.h")) { - while () { - if (/^#define PERL_VERSION\s+(\S+)/) { - print OUT "PERL_VERSION='$1'\n"; - print OUT "PATCHLEVEL='$1'\n"; # XXX compat - } - elsif (/^#define PERL_SUBVERSION\s+(\S+)/) { - print OUT "PERL_SUBVERSION='$1'\n"; - print OUT "SUBVERSION='$1'\n"; # XXX compat - } - } - close PL; -} -else { warn "Can't read ${outdir}patchlevel.h - skipping 'PATCHLEVEL'"; } - -# simple pager support for perldoc -if (`most not..file` =~ /IVVERB/) { - $pager = 'more'; - if (`more nl:` =~ /IVVERB/) { $pager = 'type/page'; } -} -else { $pager = 'most'; } -print OUT "pager='$pager'\n"; - -close OUT; diff --git a/vms/myconfig.com b/vms/myconfig.com index 1429f86..2f91648 100644 --- a/vms/myconfig.com +++ b/vms/myconfig.com @@ -55,7 +55,7 @@ $ stop = f$locate("'",line) $ value = f$extract(start,stop-start,line) $ if (f$locate("#",name).eqs.f$length(name)).and. - (name.nes."").and. - - (name.nes."'") - !bug in genconfig.pl (vms) for osvers='' ? + (name.nes."'") - !bug in configure.com for osvers='' ? then $$'name' = "'" + value !$ not necessary but looks more sh-ish $ goto Loop @@ -79,8 +79,7 @@ $! hard-coded stuff (for now): $ $cppflags = "'"+"'" !(vestigal) $ $optimize = "'"+"'" !descrip.mms has /Optimize=2 in $(XTRACCFLAGS) -$! following assigns done via `dcl` calls in genconfig.pl anyway: -$ $osname = "'"+f$edit(f$getsyi("NODE_SWTYPE"),"COLLAPSE") !genconfig.pl has "osname='VMS'" +$ $osname = "'"+f$edit(f$getsyi("NODE_SWTYPE"),"COLLAPSE") $ $osvers = f$edit(f$getsyi("VERSION")-"V","COLLAPSE") $ if f$getsyi("HW_MODEL").GT.1024 $ then $$archname = "'VMS_AXP'" !string from descrip.mms vmsperl 12-21-95 @@ -94,7 +93,7 @@ $ if $myname.eqs."" then $$myname = f$trnlnm("UCX$INET_HOST_NAME") $ if $myname.eqs."" then $$myname = f$trnlnm("TCPWARE_DOMAINNAME") $ if $myname.eqs."" then $$myname = f$trnlnm("NEWS_ADDRESS") $ if $myname.eqs."" then $$myname = f$trnlnm("SYS$NODE") -$! Is this same as genconfig.pl ? (spacing/order unknown): +$! Is this same as configure.com ? (spacing/order unknown): $ $myuname=$osname+" "+$myname+" "+$osvers+" "+F$GetSyi("HW_NAME")+"'" $ $osname = $osname+"'" $ $osvers = "'"+$osvers+"'" @@ -113,7 +112,7 @@ $ goto Research_patchlevel_h $ else $ ECHO "Can't find the header file patchlevel.h used to make config.sh" $ set default 'RATHER_LONG_DEFAULT_DIRECTORY_NAME' -$ goto look_for_genconfig.pl +$ goto spit_it_out $ endif $ endif @@ -140,161 +139,9 @@ $ if $PATCHLEVEL.eqs."" $ then $ echo "warning: PERL_VERSION was not found in ''RATHER_LONG_FILENAME_TO_FIND':" $ endif - -$look_for_genconfig_pl: $! -$ if f$search("VMS.DIR").nes."" then set default [.vms] -$ RATHER_LONG_FILENAME_TO_FIND = "GENCONFIG.PL" -$ genconfig_pl_dir = "" -$Research_genconfig_pl: -$ RATHER_LONG_FILENAME_SEARCH = F$Search(RATHER_LONG_FILENAME_TO_FIND) -$ if RATHER_LONG_FILENAME_SEARCH.EQS."" -$ then -$ if f$parse(f$environment("DEFAULT"),,,"DIRECTORY",).NES."[000000]" -$ then -$ set default [-] -$ goto Research_genconfig_pl -$ else -$ ECHO "Can't find the perl genconfig.pl used to make config.sh" -$ set default 'RATHER_LONG_DEFAULT_DIRECTORY_NAME' -$ goto look_for_config_vms -$ endif -$ else !genconfig.pl has been found -$ genconfig_pl_dir = f$parse(f$environment("DEFAULT"),,,"DIRECTORY",) -$ endif - -$ cnfg_keys = "package/hintfile/ld/dlext/d_stdstdio/" -$ cnfg_keys = cnfg_keys + "usevfork/usemymalloc/so/libpth/" -$ cnfg_keys = cnfg_keys + "dlsrc/cccdlflags/ccdlflags/lddlflags/" - -$ cnfg_vars = "$package/$hint/$ld/$dlext/$d_stdstdio/" -$ cnfg_vars = cnfg_vars + "$usevfork/$usemymalloc/$so/$libpth/" -$ cnfg_vars = cnfg_vars + "$dlsrc/$cccdlflags/$ccdlflags/$lddlflags/" - -$ open/read RATHER_LONG_CONFIG_FILE_HANDLE 'RATHER_LONG_FILENAME_SEARCH' -$read_genconfig_pl: -$ read/end_of_file = Genconfig_pl_Done RATHER_LONG_CONFIG_FILE_HANDLE line -$ if f$locate("=",line).ne.f$length(line) !then may be an assigment -$ then -$ name = f$edit( f$extract(0,f$locate("=",line),line), "COLLAPSE") -$ num = 0 -$key_genconfig_pl: -$ key = f$element(num,"/",cnfg_keys) -$ if (key .nes. "/").and.(key .nes. "") !not end of cnfg_keys -$ then -$ if key.eqs.name !then is key -$ then -$ start = f$locate("=",line)+1 -$ stop = f$length(line) -$ value = f$extract(start,stop-start,line) -$ var = f$element(num,"/",cnfg_vars) -$ 'var' = value -$ cnfg_keys = cnfg_keys - ("''name'/" ) !trim to shorten future matches -$ cnfg_vars = cnfg_vars - ("''var'/" ) !trim to shorten future matches -$ endif -$ num = num + 1 -$ goto key_genconfig_pl -$ endif ! not end of cnfg_keys -$ endif ! then may be an assigment -$ goto read_genconfig_pl - -$Genconfig_pl_Done: -$ close RATHER_LONG_CONFIG_FILE_HANDLE -$ if cnfg_vars.nes."" -$ then -$ echo "warning: the following variables were not found in ''RATHER_LONG_FILENAME_TO_FIND':" -$ echo "''cnfg_vars'" -$ endif - -$ if (p8.nes."").and.($ld.nes."") then $ld = $ld + " DBG='"+p8+"'" - -$look_for_config_vms: -$ RATHER_LONG_FILENAME_TO_FIND = "''genconfig_pl_dir'CONFIG.VMS" - -$Research_config_vms: -$ RATHER_LONG_FILENAME_SEARCH = F$Search(RATHER_LONG_FILENAME_TO_FIND) -$ if RATHER_LONG_FILENAME_SEARCH.EQS."" -$ then -$ if f$parse(f$environment("DEFAULT"),,,"DIRECTORY",).NES."[000000]" -$ then -$ set default [-] -$ goto Research_config_vms -$ else -$ ECHO "Can't find the perl config.vms used to make config.sh" -$ set default 'RATHER_LONG_DEFAULT_DIRECTORY_NAME' -$ stop -$ exit 3 -$ endif -$ endif - -$ cnfg_keys = "MEM_ALIGNBYTES/CASTNEGFLOAT/CASTFLAGS/RANDBITS/STDCHAR/" -$ cnfg_keys = cnfg_keys+"CASTI32/INTSIZE/VOIDFLAGS/DLSYM_NEEDS_UNDERSCORE" - -$ cnfg_vars = "$alignbytes/$d_castneg/$castflags/$randbits/$stdchar/" -$ cnfg_vars = cnfg_vars+"$d_casti32/$intsize/$voidflags/$d_dlsymun/" - -$ open/read RATHER_LONG_CONFIG_FILE_HANDLE 'RATHER_LONG_FILENAME_SEARCH' -$read_config_vms: -$ read/end_of_file = config_vms_Done RATHER_LONG_CONFIG_FILE_HANDLE line -$! look for "#define" or "#undef" -$ if (f$length(line).ne.0).and.- - ((f$locate("#define",line).eq.0).or.(f$locate("#undef",line).eq.0)) -$ then -$ line = f$edit(line,"COMPRESS, TRIM") -$ name = f$element(1," ",line) !macro -$ num = 0 -$key_config_vms: -$ key = f$element(num,"/",cnfg_keys) -$ if (key .nes. "/").and.(key .nes. "") !not end of cnfg_keys -$ then -$ if key.eqs.name !then is key -$ then -$ var = f$element(num,"/",cnfg_vars) -$ cnfg_keys = cnfg_keys - ("''name'/" ) !trim to shorten future matches -$ cnfg_vars = cnfg_vars - ("''var'/" ) !trim to shorten future matches -$ if (f$locate("#undef",line).eq.0) -$ then -$ 'var' = "'undef'" -$ else !is a #define -$strip_comment: -$ start = f$locate("/*",line) -$ if start.ne.f$length(line) !comment started -$ then -$ if f$locate("*/",line).ne.f$length(line) !comment stopped -$ then stop = f$locate("*/",line)+2 -$ else stop = f$locate("*/",line) -$ endif -$ comment = f$extract(start,stop-start,line) -$ line = line - comment -$ goto strip_comment -$ endif -$ line = f$edit(line,"TRIM") -$ start = f$locate(key,line)+f$length(key) -$ stop = f$length(line) -$ value = f$edit(f$extract(start,stop-start,line),"TRIM") -$ if (value.nes."") -$ then -$ 'var' = "'"+value+"'" -$ else -$ 'var' = "'define'" -$ endif -$ endif !#define -$ endif ! is key of interest -$ num = num + 1 -$ goto key_config_vms -$ endif ! not end of cnfg_keys -$ endif ! then may be #define or #undef of interest -$ goto read_config_vms - -$config_vms_Done: -$ close RATHER_LONG_CONFIG_FILE_HANDLE -$ if cnfg_vars.nes."" -$ then -$ echo "warning: the following variables were not found in ''RATHER_LONG_FILENAME_TO_FIND':" -$ echo "''cnfg_vars'" -$ endif - $spit_it_out: +$ if (p8.nes."").and.($ld.nes."") then $ld = $ld + " DBG='"+p8+"'" $! $spitshell = ECHO !<