File: generate.PL

package info (click to toggle)
libclass-methodmaker-perl 2.25-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 524 kB
  • sloc: perl: 1,849; objc: 492; makefile: 3
file content (22 lines) | stat: -rw-r--r-- 453 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
use Getopt::Long          qw( GetOptions );

use lib '.';
use Generate qw( %GENERATE );

my $dump = 0;
GetOptions( 'dump' => \$dump )
  or die "options parsing failed\n";

if ( $dump ) {
  print "$_\t$GENERATE{$_}\n"
    for sort keys %GENERATE;
  exit 0;
}

while ( my ($input, $output) = each %GENERATE ) {
  my @cmd = ('./cmmg.pl', $input, '>', $output);
  my $cmd = join ' ', @cmd;
  print "$cmd\n";
  system $cmd
    and die "$cmd failed: $?\n";
}