10 my $p5_metaconfig_base = "$FindBin::Bin/../";
12 my @std_units = glob ("$p5_metaconfig_base/U/*.U");
13 my $PWD = "$p5_metaconfig_base/perl";
16 my @perl_units = glob ("$PWD/U/*/*.U");
17 push (@perl_units, @std_units);
19 # Get the list of config.sh symbols. Be sure this is up to date!
20 # (I run the U/mksample script first to be sure.)
21 open my $wanted, "< $PWD/Porting/config.sh" or die "$0: open $PWD/Wanted: $!\n";
22 my @WANTED = map { $_->[0] }
23 sort { $a->[1] cmp $b->[1] }
24 map { [ $_, lc $_ ] } <$wanted>;
29 !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
30 This file is built by metaconfig.
32 This file contains a description of all the shell variables whose value is
33 determined by the Configure script. Variables intended for use in C
34 programs (e.g. I_UNISTD) are already described in config_h.SH. [`configpm'
35 generates pod documentation for Config.pm from this file--please try to keep
36 the formatting regular.]
40 my ($Loc, %expl, %file, %predef);
41 foreach my $file (@perl_units) {
42 open my $fh, "< $file" or die "$0: open $file: $!";
43 my $base = basename ($file);
44 $Loc = $file, next if $base eq "Loc.U" and not defined $Loc;
47 if (m/^\?S:\w+[ \t:]/ .. m/^\?S:\.$/) {
50 my ($var) = ((shift @var) =~ /^(\w+)/);
51 unless (exists $expl{$var}) {
52 $expl{$var} = [ @var, "\n" ];
58 s/^\?S://; # Remove leading ?S: markers.
59 s/^\s+(?=.)/\t/; # Ensure all lines begin with tabs.
64 close $fh or die "$0: close $file: $!";
67 defined $Loc or die "$0: Couldn't locate Loc.U: $!";
69 open my $fh, "< $Loc" or die "$0: open $Loc: $!";
71 m/^\?(\w+):\1$/ and ($expl{$1}, $file{$1}) = (1, "Loc.U");
73 close $fh or die "$0: close $Loc: $!";
84 m/^#/ and next; # Skip comments
85 m/^:/ and next; # Skip comments
86 m/^$/ and next; # Skip empty sections
87 my ($var, $val) = split /=/, $_, 2;
89 if (exists $expl{$var}) {
90 if ($file{$var} eq "Loc.U") {
91 print "$var (Loc.U):\n";
93 # If we didn't have d_portable, this info might be
94 # useful, but it still won't help with non-standard
95 # stuff if perl is built on one system but installed
96 # on others (this is common with Linux distributions,
99 This variable is defined but not used by Configure.
100 The value is the empty string and is not useful.
106 This variable is used internally by Configure to determine the
107 full pathname (if any) of the $var program. After Configure runs,
108 the value is reset to a plain "$var" and is not useful.
114 print "$var ($file{$var}):\n";
115 print @{$expl{$var}};
120 # Handle special variables from Oldsyms.U. Since these start
121 # with capital letters, metalint considers them to be "special
122 # unit" symbols. It's easier to define them here than to try
123 # to fool metalint any further. --AD 22 Oct 1999
124 # Similarly, handle the config_arg* variables from Options.U.
126 if (exists $predef{$var}) {
131 $var =~ /^(Author|Date|Header|Id|Locker|Log|Mcc|RCSfile|Revision|Source|State)$|_cflags$|^config_arg/
132 or warn "$0: couldn't find $var\n"
135 PERL_REVISION (Oldsyms.U):
136 In a Perl version number such as 5.6.2, this is the 5.
137 This value is manually set in patchlevel.h
139 PERL_VERSION (Oldsyms.U):
140 In a Perl version number such as 5.6.2, this is the 6.
141 This value is manually set in patchlevel.h
143 PERL_SUBVERSION (Oldsyms.U):
144 In a Perl version number such as 5.6.2, this is the 2.
145 Values greater than 50 represent potentially unstable
146 development subversions.
147 This value is manually set in patchlevel.h
149 PERL_APIVERSION (Oldsyms.U):
150 This value is manually set in patchlevel.h and is used
151 to set the Configure apiversion variable.
153 CONFIGDOTSH (Oldsyms.U):
154 This is set to 'true' in config.sh so that a shell script
155 sourcing config.sh can tell if it has been sourced already.
157 PERL_CONFIG_SH (Oldsyms.U):
158 This is set to 'true' in config.sh so that a shell script
159 sourcing config.sh can tell if it has been sourced already.
161 PERL_API_REVISION (patchlevel.h):
162 This number describes the earliest compatible PERL_REVISION of
163 Perl ("compatibility" here being defined as sufficient binary/API
164 compatibility to run XS code built with the older version).
165 Normally this does not change across maintenance releases.
166 Please read the comment in patchlevel.h.
168 PERL_API_VERSION (patchlevel.h):
169 This number describes the earliest compatible PERL_VERSION of
170 Perl ("compatibility" here being defined as sufficient binary/API
171 compatibility to run XS code built with the older version).
172 Normally this does not change across maintenance releases.
173 Please read the comment in patchlevel.h.
175 PERL_API_SUBVERSION (patchlevel.h):
176 This number describes the earliest compatible PERL_SUBVERSION of
177 Perl ("compatibility" here being defined as sufficient binary/API
178 compatibility to run XS code built with the older version).
179 Normally this does not change across maintenance releases.
180 Please read the comment in patchlevel.h.
182 PERL_PATCHLEVEL (Oldsyms.U):
183 This symbol reflects the patchlevel, if available. Will usually
184 come from the .patch file, which is available when the perl
185 source tree was fetched with rsync.
187 config_args (Options.U):
188 This variable contains a single string giving the command-line
189 arguments passed to Configure. Spaces within arguments,
190 quotes, and escaped characters are not correctly preserved.
191 To reconstruct the command line, you must assemble the individual
192 command line pieces, given in config_arg[0-9]*.
194 config_arg0 (Options.U):
195 This variable contains the string used to invoke the Configure
196 command, as reported by the shell in the $0 variable.
198 config_argc (Options.U):
199 This variable contains the number of command-line arguments
200 passed to Configure, as reported by the shell in the $# variable.
201 The individual arguments are stored as variables config_arg1,