10 my $p5_metaconfig_base = abs_path "$FindBin::Bin/../";
12 chdir "$p5_metaconfig_base/perl" or
13 die "Cannot use $p5_metaconfig_base/perl to find config.sh\n";
14 my @config = sort { -M $a <=> -M $b }
16 qw( config.sh uconfig.sh Porting/config.sh );
17 @config or die "Build (and test) perl before generating the Glossary\n";
18 # Get the list of config.sh symbols. Be sure this is up to date!
19 # (I run the Porting/mksample script first to be sure.)
20 $config[0] eq "config.sh" or warn "Using $config[0] instead of config.sh - Did you build?\n";
21 my $wanted = abs_path $config[0];
23 chdir "$p5_metaconfig_base/U" or
24 die "Cannot use $p5_metaconfig_base/U to find the units\n";
25 my @perl_units = map { abs_path $_ } (sort glob "*/*.U"), sort glob "../dist/U/*.U";
27 open my $wfh, "<", $wanted or die "$0: open $wanted: $!\n";
28 my @WANTED = map { $_->[0] }
29 sort { $a->[1] cmp $b->[1] }
36 !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
37 This file is built by metaconfig.
39 This file contains a description of all the shell variables whose value is
40 determined by the Configure script. Variables intended for use in C
41 programs (e.g. I_UNISTD) are already described in config_h.SH. [`configpm'
42 generates pod documentation for Config.pm from this file--please try to keep
43 the formatting regular.]
47 my ($Loc, %expl, %file, %predef);
48 foreach my $file (@perl_units) {
49 open my $fh, "<", $file or die "$0: open $file: $!";
50 my $base = basename ($file);
51 $Loc = $file, next if $base eq "Loc.U" and not defined $Loc;
54 if (m/^\?S:\w+[ \t:]/ .. m/^\?S:\.$/) {
57 my ($var) = ((shift @var) =~ /^(\w+)/);
58 unless (exists $expl{$var}) {
59 $expl{$var} = [ @var, "\n" ];
65 s/^\?S://; # Remove leading ?S: markers.
66 s/^\s+(?=.)/\t/; # Ensure all lines begin with tabs.
71 close $fh or die "$0: close $file: $!";
74 defined $Loc or die "$0: Couldn't locate Loc.U: $!";
76 open my $fh, "<", $Loc or die "$0: open $Loc: $!";
78 m/^\?(\w+):\1$/ and ($expl{$1}, $file{$1}) = (1, "Loc.U");
80 close $fh or die "$0: close $Loc: $!";
91 m/^#/ and next; # Skip comments
92 m/^:/ and next; # Skip comments
93 m/^$/ and next; # Skip empty sections
94 my ($var, $val) = split /=/, $_, 2;
96 if (exists $expl{$var}) {
97 if ($file{$var} eq "Loc.U") {
98 print "$var (Loc.U):\n";
100 # If we didn't have d_portable, this info might be
101 # useful, but it still won't help with non-standard
102 # stuff if perl is built on one system but installed
103 # on others (this is common with Linux distributions,
106 This variable is defined but not used by Configure.
107 The value is the empty string and is not useful.
113 This variable is used internally by Configure to determine the
114 full pathname (if any) of the $var program. After Configure runs,
115 the value is reset to a plain "$var" and is not useful.
121 print "$var ($file{$var}):\n";
122 print @{$expl{$var}};
127 # Handle special variables from Oldsyms.U. Since these start
128 # with capital letters, metalint considers them to be "special
129 # unit" symbols. It's easier to define them here than to try
130 # to fool metalint any further. --AD 22 Oct 1999
131 # Similarly, handle the config_arg* variables from Options.U.
133 if (exists $predef{$var}) {
138 $var =~ /^(Author|Date|Header|Id|Locker|Log|Mcc|RCSfile|Revision|Source|State)$|_cflags$|^config_arg/
139 or warn "$0: couldn't find $var\n"
142 PERL_REVISION (Oldsyms.U):
143 In a Perl version number such as 5.6.2, this is the 5.
144 This value is manually set in patchlevel.h
146 PERL_VERSION (Oldsyms.U):
147 In a Perl version number such as 5.6.2, this is the 6.
148 This value is manually set in patchlevel.h
150 PERL_SUBVERSION (Oldsyms.U):
151 In a Perl version number such as 5.6.2, this is the 2.
152 Values greater than 50 represent potentially unstable
153 development subversions.
154 This value is manually set in patchlevel.h
156 PERL_APIVERSION (Oldsyms.U):
157 This value is manually set in patchlevel.h and is used
158 to set the Configure apiversion variable.
160 CONFIGDOTSH (Oldsyms.U):
161 This is set to 'true' in config.sh so that a shell script
162 sourcing config.sh can tell if it has been sourced already.
164 PERL_CONFIG_SH (Oldsyms.U):
165 This is set to 'true' in config.sh so that a shell script
166 sourcing config.sh can tell if it has been sourced already.
168 PERL_API_REVISION (patchlevel.h):
169 This number describes the earliest compatible PERL_REVISION 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_VERSION (patchlevel.h):
176 This number describes the earliest compatible PERL_VERSION 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_API_SUBVERSION (patchlevel.h):
183 This number describes the earliest compatible PERL_SUBVERSION of
184 Perl ("compatibility" here being defined as sufficient binary/API
185 compatibility to run XS code built with the older version).
186 Normally this does not change across maintenance releases.
187 Please read the comment in patchlevel.h.
189 PERL_PATCHLEVEL (Oldsyms.U):
190 This symbol reflects the patchlevel, if available. Will usually
191 come from the .patch file, which is available when the perl
192 source tree was fetched with rsync.
194 config_args (Options.U):
195 This variable contains a single string giving the command-line
196 arguments passed to Configure. Spaces within arguments,
197 quotes, and escaped characters are not correctly preserved.
198 To reconstruct the command line, you must assemble the individual
199 command line pieces, given in config_arg[0-9]*.
201 config_arg0 (Options.U):
202 This variable contains the string used to invoke the Configure
203 command, as reported by the shell in the $0 variable.
205 config_argc (Options.U):
206 This variable contains the number of command-line arguments
207 passed to Configure, as reported by the shell in the $# variable.
208 The individual arguments are stored as variables config_arg1,