~ubuntu-branches/ubuntu/lucid/pdl/lucid

« back to all changes in this revision

Viewing changes to Doc/Doc/Config.pm.PL

  • Committer: Bazaar Package Importer
  • Author(s): Ben Gertzfield
  • Date: 2002-04-08 18:47:16 UTC
  • Revision ID: james.westby@ubuntu.com-20020408184716-0hf64dc96kin3htp
Tags: upstream-2.3.2
ImportĀ upstreamĀ versionĀ 2.3.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/local/bin/perl
 
2
 
 
3
use Config;
 
4
use File::Basename qw(&basename &dirname);
 
5
 
 
6
# List explicitly here the variables you want Configure to
 
7
# generate.  Metaconfig only looks for shell variables, so you
 
8
# have to mention them as if they were shell variables, not
 
9
# %Config entries.  Thus you write
 
10
#  $startperl
 
11
# to ensure Configure will look for $Config{startperl}.
 
12
 
 
13
# This forces PL files to create target in same directory as PL file.
 
14
# This is so that make depend always knows where to find PL derivatives.
 
15
chdir(dirname($0));
 
16
($file = basename($0)) =~ s/\.PL$//;
 
17
$file =~ s/\.pl$//
 
18
        if ($Config{'osname'} eq 'VMS' or
 
19
            $Config{'osname'} eq 'OS2');  # "case-forgiving"
 
20
open OUT,">$file" or die "Can't create $file: $!";
 
21
 
 
22
print "Extracting $file (with variable substitutions)\n";
 
23
chmod 0775, $file;
 
24
 
 
25
# In this section, perl variables will be expanded during extraction.
 
26
# You can use $Config{...} to use Configure variables.
 
27
 
 
28
print OUT "# automatically built from ".basename($0)."\n";
 
29
print OUT "# don't modify, all changes will be lost !!!!\n";
 
30
print OUT <<'!NO!SUBS!';
 
31
package PDL::Doc::Config;
 
32
 
 
33
!NO!SUBS!
 
34
 
 
35
print OUT <<"EOC";
 
36
\$PDL::Doc::pager = \'$Config{'pager'}\';
 
37
\$PDL::Doc::pager = \$ENV{PAGER} if defined \$ENV{PAGER};
 
38
\$PDL::Doc::DefaultFile = \'$Config{'man1direxp'}\';
 
39
 
 
40
1;
 
41
 
 
42
EOC