File: Makefile.PL

package info (click to toggle)
0ad 0.0.21-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 54,068 kB
  • sloc: cpp: 230,527; ansic: 23,115; python: 13,559; perl: 2,499; sh: 948; xml: 776; makefile: 696; java: 533; ruby: 229; erlang: 53; sql: 21
file content (32 lines) | stat: -rwxr-xr-x 628 bytes parent folder | download | duplicates (37)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/perl
#
# This isn't a "real" `Makefile.PL'
# It just copies the correct `Makefile.*' to `Makefile'
#
use strict;
use Getopt::Long;
use File::Copy;

sub usage() {
  die "Usage: $0 [--bcc32]\n";
}

my $source;
my $target = 'Makefile';
my $windows = $ENV{'windir'};

GetOptions( 'bcc32' => sub { $source = 'Makefile.bcc32'  } ) or usage();
if ( !defined( $source ) ) {
  $source = $windows ? 'Makefile.msvc' : 'Makefile.unix';
}

unlink($target);
$windows ? copy($source, $target) : symlink($source, $target);

print "`Makefile' is now `$source'.\n";

#
# Local Variables:
# compile-command: "perl Makefile.PL"
# End:
#