| 1 | #!/usr/local/bin/perl
|
|---|
| 2 |
|
|---|
| 3 | use Config;
|
|---|
| 4 | use File::Basename;
|
|---|
| 5 | use Cwd;
|
|---|
| 6 |
|
|---|
| 7 | # List explicitly here the variables you want Configure to
|
|---|
| 8 | # generate. Metaconfig only looks for shell variables, so you
|
|---|
| 9 | # have to mention them as if they were shell variables, not
|
|---|
| 10 | # %Config entries:
|
|---|
| 11 | # $startperl
|
|---|
| 12 | # $perlpath
|
|---|
| 13 | # $eunicefix
|
|---|
| 14 |
|
|---|
| 15 | # This forces PL files to create target in same directory as PL file.
|
|---|
| 16 | # This is so that make depend always knows where to find PL derivatives.
|
|---|
| 17 | my $origdir = cwd;
|
|---|
| 18 | chdir dirname($0);
|
|---|
| 19 | my $file = basename($0, '.PL');
|
|---|
| 20 | $file .= '.com' if $^O eq 'VMS';
|
|---|
| 21 |
|
|---|
| 22 | # Create output file.
|
|---|
| 23 | open OUT,">$file" or die "Can't create $file: $!";
|
|---|
| 24 |
|
|---|
| 25 | print "Extracting $file (with variable substitutions)\n";
|
|---|
|
|---|