#!/usr/bin/perl -w

eval 'exec /usr/bin/perl -w -S $0 ${1+"$@"}'
    if 0; # not running under some shell
#############################################################################
## Name:        script/xspp
## Purpose:     XS++ preprocessor
## Author:      Mattia Barbon
## Modified by:
## Created:     01/03/2003
## RCS-ID:      $Id: wxperl_xspp 2334 2008-01-21 22:38:57Z mbarbon $
## Copyright:   (c) 2003-2004, 2006, 2008 Mattia Barbon
## Licence:     This program is free software; you can redistribute it and/or
##              modify it under the same terms as Perl itself
#############################################################################

use strict;

=head1 NAME

xspp - XS++ preprocessor

=head1 SYNOPSIS

    xspp [--typemap=typemap.xsp [--typemap=typemap2.xsp]] Foo.xsp

=head1 DOCUMENTATION

See C<ExtUtils::XSpp>.

=cut

use Getopt::Long;

use ExtUtils::XSpp::Driver;

my @typemap_files;
GetOptions( 'typemap=s' => \@typemap_files );

my $driver = ExtUtils::XSpp::Driver->new
  ( typemaps   => \@typemap_files,
    file       => shift @ARGV,
    );
my $success = $driver->process;

exit(1) if !$success;

exit 0;
